Ignore undefined microcode error names. Signalling errors at this
authorChris Hanson <org/chris-hanson/cph>
Sat, 9 Sep 2006 03:30:23 +0000 (03:30 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 9 Sep 2006 03:30:23 +0000 (03:30 +0000)
point in the cold load makes the transition to the new microcode
unpleasant.

v7/src/runtime/uerror.scm

index 265e29460bf5d898712af4fe5ba2a49c8277f4ba..d1b1a25de9732a13a2742c9a27b16fadccb8d77a 100644 (file)
@@ -1,8 +1,9 @@
 #| -*-Scheme-*-
 
-$Id: uerror.scm,v 14.52 2003/02/14 18:28:34 cph Exp $
+$Id: uerror.scm,v 14.53 2006/09/09 03:30:23 cph Exp $
 
-Copyright (c) 1988-2001 Massachusetts Institute of Technology
+Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
+Copyright 1994,1996,2001,2006 Massachusetts Institute of Technology
 
 This file is part of MIT/GNU Scheme.
 
@@ -51,17 +52,22 @@ USA.
 
 (define error-handler-vector)
 (define default-error-handler)
+(define unknown-error-names)
 
 (define (define-error-handler error-name handler)
-  (vector-set! error-handler-vector
-              (or (microcode-error/name->code error-name)
-                  (error "Unknown microcode error name:" error-name))
-              (lambda (error-code interrupt-enables)
-                (set-interrupt-enables! interrupt-enables)
-                (call-with-current-continuation
-                 (lambda (continuation)
-                   (handler continuation)
-                   (default-error-handler continuation error-code))))))
+  (let ((error-code (microcode-error/name->code error-name)))
+    (if error-code
+       (vector-set! error-handler-vector
+                    error-code
+                    (lambda (error-code interrupt-enables)
+                      (set-interrupt-enables! interrupt-enables)
+                      (call-with-current-continuation
+                       (lambda (continuation)
+                         (handler continuation)
+                         (default-error-handler continuation error-code)))))
+       (begin
+         (set! unknown-error-names (cons error-name unknown-error-names))
+         unspecific))))
 
 (define (define-low-level-handler error-name handler)
   (vector-set! error-handler-vector
@@ -431,6 +437,8 @@ USA.
                  (subvector->list error-code 1 (vector-length error-code)))
            (doit error-code '()))))))
 
+(set! unknown-error-names '())
+
 (define-low-level-handler 'ERROR-WITH-ARGUMENT
   (lambda (continuation argument)
     ((if (and (vector? argument)