Menu

#16 Check return codes everywhere

open
nobody
None
5
2012-10-04
2010-11-22
No

Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "SetFilePointer" like in the function "read_disk" and from "fprintf" in the function "ext2explore_log"?
https://github.com/mregmi/ext2read/blob/master/platform_win32.c#L99
https://github.com/mregmi/ext2read/blob/master/log.c#L38

Discussion

  • Manish Regmi

    Manish Regmi - 2010-11-22

    Hello elfring,
    Thank you for all the input. these days i am pretty busy and have not updated and looked at the code in some time. Let me know if you (or anybody else) are interested in maintaining the project. thanks.

     
  • Markus Elfring

    Markus Elfring - 2010-11-22

    I can contribute to your software with concrete patches for my various update suggestions if usual agreements for design decisions can be achieved. I do not feel comfortable to take over maintenance completely so far. (Do you think in this direction?)

     
  • Manish Regmi

    Manish Regmi - 2010-11-29

    sorry for late reply i was away because of thanksgiving holidays. It sounds like a good idea but i am not sure if i would be able to regularly maintain it. one idea is to give me a pull request from your git.

     
  • Markus Elfring

    Markus Elfring - 2010-11-30

    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

     

Log in to post a comment.

MongoDB Logo MongoDB