summaryrefslogtreecommitdiff
path: root/module/srfi/srfi-18.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-05-29 16:01:43 +0200
committerAndy Wingo <wingo@pobox.com>2009-05-29 16:01:43 +0200
commit938d46a35d39ec5d7b5fa858a8783136ce24d10d (patch)
tree17153f062515c4ae74815f65c4aa1f30a92e1ce4 /module/srfi/srfi-18.scm
parent1ee2c72eafaae5f91f4c899bc4b4853af5c16f28 (diff)
parente3c5df539640a36eb1493f581087d54a4714f337 (diff)
downloadguile-938d46a35d39ec5d7b5fa858a8783136ce24d10d.tar.gz
Merge branch 'syncase-in-boot-9'
Conflicts: module/Makefile.am
Diffstat (limited to 'module/srfi/srfi-18.scm')
-rw-r--r--module/srfi/srfi-18.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/module/srfi/srfi-18.scm b/module/srfi/srfi-18.scm
index 925ecb304..dd92079be 100644
--- a/module/srfi/srfi-18.scm
+++ b/module/srfi/srfi-18.scm
@@ -151,8 +151,10 @@
(hashq-set! thread-exception-handlers ct hl)
(handler obj))
(lambda ()
- (let ((r (thunk)))
- (hashq-set! thread-exception-handlers ct hl) r))))))
+ (call-with-values thunk
+ (lambda res
+ (hashq-set! thread-exception-handlers ct hl)
+ (apply values res))))))))
(define (current-exception-handler)
(car (current-handler-stack)))
@@ -249,8 +251,8 @@
(define (wrap thunk)
(lambda (continuation)
(with-exception-handler (lambda (obj)
- (apply (current-exception-handler) (list obj))
- (apply continuation (list)))
+ ((current-exception-handler) obj)
+ (continuation))
thunk)))
;; A pass-thru to cancel-thread that first installs a handler that throws