#786 Completion of error handling

open
nobody
General (289)
5
2011-11-19
2011-11-19
Markus Elfring
No

I mentioned this issue in a short discussion during the exhibition "OpenRheinRuhr" on the previous weekend.

A few checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "printf" like in the function "handler_print" and from "signal" in the function "main"?
https://github.com/geany/geany/blob/d06e9f4575728093b3355de31ac8efb89e1a38b1/src/log.c#L72
https://github.com/geany/geany/blob/8f280ed884721a0a1c75462e428b9bcffb3ac527/src/main.c#L979

How do you think about to apply aspect-oriented software development for this use case?
http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All
http://aspectc.org/

Discussion

  • Lex Trotman
    Lex Trotman
    2012-09-09

    The cases in log.c, main.c and build.c are all situations where testing the return values is of no use as there will be no alternative action if the calls fail, and it does not seem to be any benefit to add visual clutter of marking the result unused just to stop complaints from a tool not normally used by the project.

    The utils_mkdir call doesn't make sense, more investigation needed.