From 3dba6ca7c542fefb2124340f948a0b10eea94b91 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 7 Apr 2020 06:36:04 -0700 Subject: 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. --- parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parser.c') diff --git a/parser.c b/parser.c index 992e9719..7083353b 100644 --- a/parser.c +++ b/parser.c @@ -1093,7 +1093,7 @@ static val repl_intr(val signo, val async_p) { (void) signo; (void) async_p; - uw_throw(intr_s, lit("intr")); + return uw_rthrow(intr_s, lit("intr")); } static val read_eval_ret_last(val env, val counter, @@ -1158,7 +1158,7 @@ static val repl_warning(val out_stream, val exc, struct args *rest) else format(out_stream, lit("** warning: ~!~a\n"), car(args), nao); - uw_throw(continue_s, nil); + return uw_rthrow(continue_s, nil); } static int is_balanced_line(const wchar_t *line, void *ctx) -- cgit v1.2.3