bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20938: make-dynamic-state, with-dynamic-state & exceptions


From: Josep Portella Florit
Subject: bug#20938: make-dynamic-state, with-dynamic-state & exceptions
Date: Tue, 30 Jun 2015 15:50:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0

This code crashes Guile 2.0.11:

(define x (make-dynamic-state))
(with-dynamic-state x (lambda () (/ 1 0)))


For now I'm using this workaround:

(let ((w-d-s with-dynamic-state))
  (set! with-dynamic-state
        (lambda (s p)
          (let ((e #f))
            (w-d-s s (lambda ()
                       (catch #t p
                         (lambda x (set! e x)))))
            (when e (apply throw e))))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]