table read no longer verifies input gracefully, throws assert instead
the test suite includes the test func_trans_punch.in to create a transmitted continuum data file called func_trans_punch.trn, and a second test func_trans_read.in which reads it in.
the transmitted continuum file may be damaged or come from an inappropriate version of cloudy. the table read command used to verify the continuum file before trying any operations on it. there were print statements which would try to explain what it found wrong.
I used a damaged transmitted continuum file - the code now throws an assert. to see this do the following:
run func_trans_punch to create func_trans_punch.trn
edit func_trans_punch.trn and delete some continuum point in the middle. i deleted two for good measure.
run func_trans_read - it will throw an assert with no indication of what was wrong.
user input data must be treated as a dangerous source of noise - anything can come in. the code should validate the input and explain what was wrong. it should not crash because of invalid input data.
this was broken since c08 - i tried the same thing with c08 and it performs correctly - here is the output:
DISASTER ReadTable: The energy mesh of the file read in by the TABLE READ command does not agree with this version of Cloudy.
DISASTER ReadTable: Was the file generated by an older version of the code?
DISASTER ReadTable: Did the first model do more than one iteration, but the LAST option was missing on PUNCH LAST TRANSMITTED CONTINUUM?
DISASTER ReadTable: Number of points read in= 3830
ReadTable: input, internal energies= 7.0310e+06 6.6214e+06
[Stop in ReadTable at ../cont_ffun.cpp:453, something went wrong]