errhdl

The liberrhdl is a small C library that offers error handling methods similar to the exception handling in C++. In the event of errors no exception objects are thrown, but an error class name and an error message are set and execution continues at the next 'OnError' statement. The library can be seen as a nice frontend to setjmp/longjmp. The library supports the use of POSIX threads and is thread safe.

Download

Documentation

Changes

  • 2006-02-21: Version 0.3 released
    • fixed a bug, which caused ignored errors in a called function to escalate in the calling function (the errhdl_state->class = 0 assignment was moved from the Try macro to the OnError macro)
  • 2005-12-14: Version 0.2 released
    • added specific support for POSIX threads
    • included wrapper for regular expression functions
    • included an example program