GNU bug report logs -
#39811
Missing dynwind exit application
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 03 Mar 2020 21:33:47 +0100
with message-id <87r1y918lw.fsf <at> igalia.com>
and subject line Re: bug#39811: Missing dynwind exit application
has caused the debbugs.gnu.org bug report #39811,
regarding Missing dynwind exit application
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
39811: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39811
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Executing this code on guile-3.0.0:
(dynamic-wind
(lambda () (pk 'enter))
(lambda () (catch #t
(lambda () (throw 1))
(lambda x (pk 'catch x) (apply throw x))))
(lambda () (pk 'leave)))
Leads to the output:
scheme@(guile-user)> (load "bug.scm")
;;; (enter)
;;; (catch (a))
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Throw to key `a' with args `()'.
What, it does not execute the leave part of the dynamic wind.
This works however,
(catch #t
(lambda ()
(dynamic-wind
(lambda () (pk 'enter))
(lambda () (catch #t
(lambda () (throw 'a))
(lambda x (pk 'catch x) (apply throw x))))
(lambda () (pk 'leave))))
(lambda x #f))
So is this how it should be?
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> writes:
> Executing this code on guile-3.0.0:
>
> (dynamic-wind
> (lambda () (pk 'enter))
> (lambda () (catch #t
> (lambda () (throw 1))
> (lambda x (pk 'catch x) (apply throw x))))
> (lambda () (pk 'leave)))
>
> Leads to the output:
>
> scheme@(guile-user)> (load "bug.scm")
> ;;; (enter)
> ;;; (catch (a))
>
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> Throw to key `a' with args `()'.
>
> What, it does not execute the leave part of the dynamic wind.
That is because the REPL leaves you in the context of where the uncaught
error was thrown. If you ,quit the REPL to go back to the outer REPL,
it will print "leave" as expected. Please reopen if I have
misunderstood :)
Cheers,
Andy
This bug report was last modified 5 years and 84 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.