From da4b3ef2f932606108aacb9d2e78ab0a9984e908 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 7 Sep 2015 09:27:44 -0700 Subject: Store exception in repl variable. * parser.c (repl): If an exception is caught, don't store nil in the repl result variable and hash. Rather, store a cons cell holding the exception symbol and arguments. --- parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index 37255ae0..f06ccae2 100644 --- a/parser.c +++ b/parser.c @@ -566,8 +566,9 @@ val repl(val bindings, val in_stream, val out_stream) } uw_catch (exsym, exvals) { - reg_varl(var_sym, nil); - sethash(result_hash, var_counter, nil); + val exinfo = cons(exsym, exvals); + reg_varl(var_sym, exinfo); + sethash(result_hash, var_counter, exinfo); lino_hist_add(ls, line_u8); if (uw_exception_subtype_p(exsym, syntax_error_s)) { -- cgit v1.2.3