diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-07 06:36:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-07 06:36:04 -0700 |
commit | 3dba6ca7c542fefb2124340f948a0b10eea94b91 (patch) | |
tree | f7678e2b25d2e0f41de83631e03ae30fca884ef9 /unwind.c | |
parent | d104ccf947c66035850048e044e76a4dfb4dec7f (diff) | |
download | txr-3dba6ca7c542fefb2124340f948a0b10eea94b91.tar.gz txr-3dba6ca7c542fefb2124340f948a0b10eea94b91.tar.bz2 txr-3dba6ca7c542fefb2124340f948a0b10eea94b91.zip |
exceptions: use uw_rthrow for non-error exceptions.
* eval.c (eval_exception): This function is shared by warnings
and errors. Use uw_throw. The eval_error caller already has
an abort() after its eval_exception call, which makes that
code path continue to be equivalent to uw_throw. The behavior
changes for the other caller, eval_warn, which will now return
if the warning is not handled.
(eval_defr_warn, gather_free_refs, gather_free_refs_nw): Throw
non-error exception with uw_rthrow.
* match.c (v_throw, v_assert, h_assert): Use uw_rthrow for these
directives, just like the throw function.
* parser.c (repl_intr, repl_warning): Use uw_rthrow.
* unwind.c (uw_muffle_warning, uw_release_deferred_warnings):
Likewise.
Diffstat (limited to 'unwind.c')
-rw-r--r-- | unwind.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -501,7 +501,7 @@ val uw_muffle_warning(val exc, struct args *args) { (void) exc; (void) args; - uw_throw(continue_s, nil); + return uw_rthrow(continue_s, nil); } val uw_trace_error(val ctx, val exc, struct args *args) @@ -890,7 +890,7 @@ val uw_release_deferred_warnings(void) uw_catch_begin (cons(continue_s, nil), exsym, exvals); - uw_throw(warning_s, caar(wl)); + uw_rthrow(warning_s, caar(wl)); uw_catch(exsym, exvals) { (void) exsym; (void) exvals; } |