The TODO suggests replacing an error signal return of -99 with a crash but I'm not sure that this is the right thing to do. I don't like the way it works now because -99 has no intrinsic meaning, it just shows up on the report and you the human reader are just supposed to intuit that "something went wrong" and ignore the rest of the report. That is seriously bogus, IMHO. What I think should actually happen here is that the report should just be replaced with a detailed explanation of why the report could not be produced. In order to accomplish this by_s_m needs to be modified to allow an exit that conveys the error message, whatever it is. Perhaps it should always return a list containing an error code, error explanation, and data, if no errors.
The TODO suggests replacing an error signal return of -99 with a crash but I'm not sure that this is the right thing to do. I don't like the way it works now because -99 has no intrinsic meaning, it just shows up on the report and you the human reader are just supposed to intuit that "something went wrong" and ignore the rest of the report. That is seriously bogus, IMHO. What I think should actually happen here is that the report should just be replaced with a detailed explanation of why the report could not be produced. In order to accomplish this by_s_m needs to be modified to allow an exit that conveys the error message, whatever it is. Perhaps it should always return a list containing an error code, error explanation, and data, if no errors.