Is there some crossplatform c-library for exception handling (to implement try / catch in C)?
I'm also looking for documentation how it's realized in c++ (how the interrupts are masking or something like this)
You can try exceptions4c; it's an exception handling library in ANSI C that supports: throw, try, catch, finally and a few more goodies. For example, it supports the Dispose pattern, so you can automatically release resources. You can also handle signals (such as SIGFPE and SIGSEGV) as if they were exceptions.
It's implemented on top of setjmp and longjmp (standard C library), and it's free software, so you can read and modify the source code.
Oh, by the way, I'm the author :) Please take a look at it, and compare it against other alternatives to see which fits you most.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With