From 723f24a59ba019cd2974efdcea731c6d9ca65842 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 7 Aug 2015 06:41:10 -0700 Subject: Change to different exception for debugger quit. * debug.c (debug_quit_s): New global variable. (debug): Throw debug-quit, not query-error. (debug_init): Initialize debug_quit_s. --- ChangeLog | 8 ++++++++ debug.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 362b5ad3..42a645de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-08-07 Kaz Kylheku + + Change to different exception for debugger quit. + + * debug.c (debug_quit_s): New global variable. + (debug): Throw debug-quit, not query-error. + (debug_init): Initialize debug_quit_s. + 2015-08-06 Kaz Kylheku * debug.c (help): Rearrange menu. Show missing quit command. diff --git a/debug.c b/debug.c index e0429421..54052eef 100644 --- a/debug.c +++ b/debug.c @@ -51,6 +51,8 @@ static val breakpoints; static val last_command; static int cols = 80; +val debug_quit_s; + /* C99 inline instantiations. */ #if __STDC_VERSION__ >= 199901L val debug_check(val form, val bindings, val data, val line, @@ -230,7 +232,7 @@ val debug(val form, val bindings, val data, val line, val pos, val base) } } } else if (equal(command, lit("q"))) { - uw_throwf(query_error_s, lit("terminated via debugger"), nao); + uw_throwf(debug_quit_s, lit("terminated via debugger"), nao); } else { format(std_debug, lit("unrecognized command: ~a\n"), command, nao); } @@ -258,6 +260,7 @@ void debug_init(void) { step_mode = 1; protect(&breakpoints, &last_command, convert(val *, 0)); + debug_quit_s = intern(lit("debug-quit"), user_package); { char *columns = getenv("COLUMNS"); if (columns) -- cgit v1.2.3