GNU bug report logs - #20938
make-dynamic-state, with-dynamic-state & exceptions

Previous Next

Package: guile;

Reported by: Josep Portella Florit <jpf <at> primfilat.com>

Date: Tue, 30 Jun 2015 13:51:03 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Josep Portella Florit <jpf <at> primfilat.com>
To: 20938 <at> debbugs.gnu.org
Subject: bug#20938: Improved workaround
Date: Wed, 01 Jul 2015 08:49:04 +0200
The workaround in my other message discards the return value of
`with-dynamic-state'.  I've improved it:

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




This bug report was last modified 8 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.