From: Andy Wingo Date: Thu, 10 Jun 2010 11:44:37 +0000 (+0200) Subject: fix error handling when reading debugger args X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/222a2b19a1d8eb25a1dbc3ff52873ee5274d972b 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. --- 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))))))