diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index 91b9e938f..33ebe6722 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -6,6 +6,9 @@ Thu Oct 17 20:33:08 1996 Gary Houston Just interpret (almost) any throw with 4 args as an error throw. Delete some try-load stuff that was already commented out. + Second thoughts, keep handle-system-error but call it from + error-catching-loop. + Tue Oct 15 17:07:20 1996 Jim Blandy * boot-9.scm: Doc fixes. diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index c501f41c0..3e09bf128 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -2039,23 +2039,24 @@ ;; This is the other cons-leak closure... (lambda () (cond ((= (length args) 4) - ;; anything with 4 args is interpreted as an - ;; error throw. - (let ((cep (current-error-port))) - (if (and (memq 'backtrace (debug-options)) - (stack? the-last-stack)) - (begin - (newline cep) - (display-backtrace the-last-stack cep) - (newline cep))) - (apply display-error the-last-stack cep args) - (force-output cep) - (throw 'abort key))) + (apply handle-system-error key args)) (else (apply bad-throw key args)))))))))) (and next (loop next)))) (loop (lambda () #t))) +(define (handle-system-error key . args) + (let ((cep (current-error-port))) + (if (and (memq 'backtrace (debug-options)) + (stack? the-last-stack)) + (begin + (newline cep) + (display-backtrace the-last-stack cep) + (newline cep))) + (apply display-error the-last-stack cep args) + (force-output cep) + (throw 'abort key))) + (define (quit . args) (apply throw 'quit args))