ERROR-DECISION can't be done inside the REPL message, because that
authorChris Hanson <org/chris-hanson/cph>
Tue, 2 Nov 1993 23:32:15 +0000 (23:32 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 2 Nov 1993 23:32:15 +0000 (23:32 +0000)
message is protected by IGNORE-ERRORS.  If another error occurs during
the decision, it must start a nested REPL.

v7/src/runtime/rep.scm

index c55fa98dfce004818579f1de6aaebee01f171d03..6b7268dbe66a7c7d8ca21411d47ab877a4b0cc8b 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: rep.scm,v 14.43 1993/10/21 12:25:15 cph Exp $
+$Id: rep.scm,v 14.44 1993/11/02 23:32:15 cph Exp $
 
 Copyright (c) 1988-93 Massachusetts Institute of Technology
 
@@ -416,6 +416,13 @@ MIT in each case. |#
               (if (default-object? prompt) 'INHERIT prompt))))
 \f
 (define (repl-driver repl)
+  (let ((condition (repl/condition repl)))
+    (if (and condition (condition/error? condition))
+       (cond ((cmdl/operation repl 'ERROR-DECISION)
+              => (lambda (operation)
+                   (operation repl condition)))
+             (hook/error-decision
+              (hook/error-decision repl condition)))))
   (let ((reader-history (repl/reader-history repl))
        (printer-history (repl/printer-history repl)))
     (port/set-default-environment (cmdl/port repl) (repl/environment repl))
@@ -480,16 +487,8 @@ MIT in each case. |#
                           (*unparser-string-length-limit* 500))
                 (condition/report-string condition)))))
      (and condition
-         (cmdl-message/append
-          (and (condition/error? condition)
-               (lambda (repl)
-                 (cond ((cmdl/operation repl 'ERROR-DECISION)
-                        => (lambda (operation)
-                             (operation repl condition)))
-                       (hook/error-decision
-                        (hook/error-decision repl condition)))))
-          (and repl:allow-restart-notifications?
-               (condition-restarts-message condition))))
+         repl:allow-restart-notifications?
+         (condition-restarts-message condition))
      repl/set-default-environment)))
 
 (define hook/error-decision)