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:
2024-12-22 08:55:51 -05:00
parent d20fbbebe6
commit 53e7e6a094
14 changed files with 195 additions and 82 deletions

View File

@@ -10,8 +10,11 @@ int main(void)
{
TRY {
THROW(3, NULL);
} CLEANUP {
} EXCEPT {
} CATCH(3) {
THROW(3, NULL);
THROW(3, NULL);
} FINALLY {
} ETRY;
EXCLIB_TRACE("Should never get here");