From 222a2b19a1d8eb25a1dbc3ff52873ee5274d972b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 10 Jun 2010 13:44:37 +0200 Subject: [PATCH] fix error handling when reading debugger args * module/system/vm/debug.scm (debugger-repl): Errors reading debugger args no longer drop us out of the debugger. --- module/system/vm/debug.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm index be6d0312d..815135647 100644 --- a/module/system/vm/debug.scm +++ b/module/system/vm/debug.scm @@ -397,11 +397,16 @@ With an argument, select a frame by index, then show it." (catch 'quit (lambda () (let loop () - (let ((args (save-module-excursion + (let ((args (call-with-error-handling (lambda () - (set-current-module commands) - (read-args prompt))))) - (apply handle args) + (save-module-excursion + (lambda () + (set-current-module commands) + (read-args prompt)))) + #:on-error 'pass))) + ;; args will be unspecified if there was a read error. + (if (not (unspecified? args)) + (apply handle args)) (loop)))) (lambda (k . args) (apply values args))))))