* debugger.scm (eval-handler): Handle unhandled exceptions.
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Thu, 16 Sep 1999 22:42:11 +0000 (22:42 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Thu, 16 Sep 1999 22:42:11 +0000 (22:42 +0000)
ice-9/debugger.scm

index 7e4ad8b..a70ce3c 100644 (file)
@@ -548,10 +548,15 @@ frames that were created more recently.  N defaults to one."
       state)))
 \f
 (define (eval-handler key . args)
-  (apply display-error
-        (make-stack #t eval-handler)
-        (current-output-port)
-        args)
+  (let ((stack (make-stack #t eval-handler)))
+    (if (= (length args) 4)
+       (apply display-error stack (current-output-port) args)
+       ;; We want display-error to be the "final common pathway"
+       (catch #t
+              (lambda ()
+                (apply bad-throw key args))
+              (lambda (key . args)
+                (apply display-error stack (current-output-port) args)))))
   (throw 'continue))
 
 (define-command "evaluate" '(object)