1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-13 15:10:34 +02:00

fix multiple values returning from srfi-18's `with-exception-handler'

* module/srfi/srfi-18.scm (with-exception-handler): Hah! Fixed a
  scurrilous bug in which we assumed that the thunk returned one or more
  values. Hah.
This commit is contained in:
Andy Wingo 2009-05-21 21:39:37 +02:00
parent 0f423f20aa
commit 2032f3d1db

View file

@ -151,8 +151,10 @@
(hashq-set! thread-exception-handlers ct hl) (hashq-set! thread-exception-handlers ct hl)
(handler obj)) (handler obj))
(lambda () (lambda ()
(let ((r (thunk))) (call-with-values thunk
(hashq-set! thread-exception-handlers ct hl) r)))))) (lambda res
(hashq-set! thread-exception-handlers ct hl)
(apply values res))))))))
(define (current-exception-handler) (define (current-exception-handler)
(car (current-handler-stack))) (car (current-handler-stack)))