Skip to content

Commit

Permalink
exception: Implemented a re-throw macro for re-throwing exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonmux committed Jun 2, 2024
1 parent c2fad0d commit 2e5bcb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/include/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ extern exception_s *innermost_exception;
if (exception_frame.type) \
switch (exception_frame.type)

#define RETHROW \
if (innermost_exception) \
raise_exception(exception_frame->type, exception_frame->msg)

#define TRY_CATCH(e, type_mask) \
(e).type = 0; \
(e).mask = (type_mask); \
Expand Down

0 comments on commit 2e5bcb1

Please sign in to comment.