Added a CLEANUP mechanism to the exception handling library. Fixed a bug in the way setjmp() return codes were being handled that lead to infinite loops in some cases, exceptions getting missed in others. Made FINALLY {} a required element (unfortunately).
This commit is contained in:
@@ -5,11 +5,15 @@ int main(void)
|
||||
TRY {
|
||||
TRY {
|
||||
THROW(3, NULL);
|
||||
} EXCEPT {
|
||||
} CATCH(5) {
|
||||
EXCLIB_TRACE("Caught 5");
|
||||
} FINALLY {
|
||||
} ETRY;
|
||||
} EXCEPT {
|
||||
} CATCH(3) {
|
||||
EXCLIB_TRACE("Caught 3");
|
||||
} FINALLY {
|
||||
} ETRY;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user