CException
CException is simple exception handling in C. It is significantly faster than full-blown C++ exception handling but loses some flexibility. It is portable to any platform supporting setjmp/longjmp.
Features
- Portable
- Error Logging
Tags
- try-catch
- exception-handling
- c-library
CException News & Activities
Recent activities
CException information
What is CException?
CException is simple exception handling in C. It is significantly faster than full-blown C++ exception handling but loses some flexibility. It is portable to any platform supporting setjmp/longjmp.
The main library is only two small files (CException.h and CException.c), plus maybe a config file where you stick 4 defines if you want to customize its behavior. When you download the package, you also get some docs and some tests that we have used to verify that everything is working peachy.
There is also a stub where you can define a function for CException to call when there is no master Try ... Catch... a fallback mechanism so that the application doesn't just take a blind leap into random memory.
There are about a gabillion exception frameworks using a similar setjmp/longjmp method out there... and there will probably be more in the future. Unfortunately, when we started our last embedded project, all those that existed either (a) did not support multiple tasks (therefore multiple stacks) or (b) were way more complex than we really wanted.


