From: Chris Hanson Date: Sat, 9 Sep 2006 03:30:23 +0000 (+0000) Subject: Ignore undefined microcode error names. Signalling errors at this X-Git-Tag: 20090517-FFI~941 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=712aa84d1cfb3256bd549b2d0d4b518706abaa20;p=mit-scheme.git Ignore undefined microcode error names. Signalling errors at this point in the cold load makes the transition to the new microcode unpleasant. --- diff --git a/v7/src/runtime/uerror.scm b/v7/src/runtime/uerror.scm index 265e29460..d1b1a25de 100644 --- a/v7/src/runtime/uerror.scm +++ b/v7/src/runtime/uerror.scm @@ -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)