mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-14 08:27:34 +02:00
Handling reraise properly in exception-protect.
This commit is contained in:
parent
45f7d85360
commit
99f7f3288b
1 changed files with 4 additions and 8 deletions
|
@ -1003,14 +1003,10 @@
|
||||||
(cond ((not finalized?)
|
(cond ((not finalized?)
|
||||||
(set! finalized? #t)
|
(set! finalized? #t)
|
||||||
(final))))))
|
(final))))))
|
||||||
(with-exception-handler
|
(protect (exn (else (run-finalize) (raise exn)))
|
||||||
(lambda (exn)
|
(let ((res (thunk)))
|
||||||
(run-finalize)
|
(run-finalize)
|
||||||
(raise exn))
|
res))))
|
||||||
(lambda ()
|
|
||||||
(let ((res (thunk)))
|
|
||||||
(run-finalize)
|
|
||||||
res)))))
|
|
||||||
|
|
||||||
(define-syntax exception-protect
|
(define-syntax exception-protect
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
|
Loading…
Add table
Reference in a new issue