Check return codes everywhere
Brought to you by:
marcus_martin
Some checks for return codes are missing.
Examples:
Would you like to add more error handling for return values from file functions?
http://towhee.cvs.sourceforge.net/towhee/towhee/Utils/car2towhee.c?revision=1.1&view=markup
Logged In: YES
user_id=835111
Originator: NO
Much of the error handling on return codes was added relatively late in the development so it has been an ongoing process to add in the appropriate checks. If you are interested in patching up such problems then we would be happy to incorporate your fixes into the next release.
Otherwise if you have specific calls or line numbers where the error checking is lacking then I can take a look and fix those problems.
thanks,
Marcus
Logged In: YES
user_id=572001
Originator: YES
I see some open issues in your main() function.
Another example:
http://towhee.cvs.sourceforge.net/towhee/towhee/Utils/analyse_histogram.F?revision=1.3&view=markup
open (1,file=' ...
Would you like to add an instruction like the following?
if (st /= 0) stop "The input file XYZ could not be opened."
Finished working my way through every subroutine and checking the lfailure error code to make sure it is promptly followed by a return. Version 6.0.3 should have proper handling of every possible failure code.
If you seen any more issues in that version please let me know.
Marcus
Would you like to complete error detection and corresponding handling in the source files "Utils/car2towhee.c" and "Utils/analyse_histogram.F"?
I am unlikely to add graceful error checking into the utilities in the near future. However, since you have an interest I would be quite willing to receive any changes you make to those routines so that they exit gracefully when an error is encountered.
Marcus
I would like to achieve consensus on acceptable approaches.
Would you like to reduce the efforts for error code checking by an exception class hierarchy?
http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
http://cexcept.sourceforge.net/
Would you like to try aspect-orientation?
http://en.wikipedia.org/wiki/Aspect-oriented_programming
http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All