From db8b34eea88e1b634073b120acede13b1e19a8d8 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 6 Sep 2015 09:03:49 -0700 Subject: repl suppresses syntax error exceptions * parser.c (repl): If an expression is caught of type syntax-error, then just suppress it. It is not informative in this situation because the syntax error diagnostics have appeared on the tty. A syntax error exceptions is thrown out of the reader so that program logic doesn't ignore errors. --- parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parser.c') diff --git a/parser.c b/parser.c index d39d1fb6..e7dab1ca 100644 --- a/parser.c +++ b/parser.c @@ -535,7 +535,9 @@ val repl(val bindings, val in_stream, val out_stream) } uw_catch (exsym, exvals) { - if (uw_exception_subtype_p(exsym, error_s)) { + if (uw_exception_subtype_p(exsym, syntax_error_s)) { + /* suppress syntax error exceptions: uninformative in the repl */ + } else if (uw_exception_subtype_p(exsym, error_s)) { obj_pprint(car(exvals), out_stream); if (cdr(exvals)) { put_string(lit(" "), out_stream); -- cgit v1.2.3