diff --git a/lib/init-7.scm b/lib/init-7.scm index fdca37ec..aba6d5c2 100644 --- a/lib/init-7.scm +++ b/lib/init-7.scm @@ -1003,14 +1003,10 @@ (cond ((not finalized?) (set! finalized? #t) (final)))))) - (with-exception-handler - (lambda (exn) - (run-finalize) - (raise exn)) - (lambda () - (let ((res (thunk))) - (run-finalize) - res))))) + (protect (exn (else (run-finalize) (raise exn))) + (let ((res (thunk))) + (run-finalize) + res)))) (define-syntax exception-protect (syntax-rules ()