Check return codes everywhere
Brought to you by:
kimmov
Some checks for return codes are missing.
Examples:
Would you like to add more error handling for return values from "SysAllocStringByteLen" like in the constructor "MakeAnsi" and from "ftell" in the member function "HexFile::Open"?
http://frhed.svn.sourceforge.net/viewvc/frhed/trunk/FRHED/AnsiConvert.cpp?revision=476&view=markup
http://frhed.svn.sourceforge.net/viewvc/frhed/trunk/FRHED/HexFile.cpp?revision=782&view=markup
Do you maybe want write a ptach for this item, too? :)
I can not provide a patch for this bug report directly because I would prefer to clarify a few software design options before programming.
I suggest to avoid unchecked function calls.
Would you like to detect every error situation as early as possible?
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
How do you think about to apply aspect-oriented software development?
http://aspectc.org/
http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All
> Would you like to reduce the efforts for error code checking by an
> exception class hierarchy?
In PHP5 and VB.net I like using try/catch! :)
Those return values CAN be checked. I'm not doing that but can review a patch.
No patch so closing.