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,8 +5,12 @@ int main(void)
|
||||
{
|
||||
TRY {
|
||||
THROW(2, NULL);
|
||||
} CLEANUP {
|
||||
} EXCEPT {
|
||||
} DEFAULT {
|
||||
EXCLIB_TRACE("Inside of DEFAULT - I catch everything!");
|
||||
return 0;
|
||||
} FINALLY {
|
||||
} ETRY;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user