Exception libraries for C (not C++)
Asked Answered
P

4

6

I am rolling my own exception library for C and would like good examples to examine.

So far, I have been looking at David Hanson's: http://drhanson.net/work/

But I know I've seen other ones available in the past. Can you send me some additional pointers?

Thanks,

SetJmp

Prophet answered 11/9, 2009 at 11:20 Comment(0)
F
3

Here is one, compatible with C89 and implementing the try/catch/finally schema as can be found in other OO languages.

Faddish answered 11/9, 2009 at 11:54 Comment(0)
H
1

Symbian implemented exceptions (called 'leaves') in terms of longjmp. This was C++ code, but translatable to C. There's a previous post about this.

Holocrine answered 11/9, 2009 at 11:24 Comment(0)
B
0

Take a look at XXL: http://www.zork.org/xxl/

I found it quite usable in a previous project. Hasn't been updated in a while though.

Barri answered 18/9, 2009 at 4:56 Comment(0)
F
0

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.

Faddish answered 27/10, 2009 at 16:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.