|
From: | GNU bug Tracking System |
Subject: | bug#39811: closed (Missing dynwind exit application) |
Date: | Tue, 03 Mar 2020 20:35:01 +0000 |
Your message dated Tue, 03 Mar 2020 21:33:47 +0100 with message-id <address@hidden> 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 address@hidden.) -- 39811: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39811 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: Missing dynwind exit application Date: Thu, 27 Feb 2020 19:59:25 +0100 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?
--- End Message ---
--- Begin Message ---Subject: Re: bug#39811: Missing dynwind exit application Date: Tue, 03 Mar 2020 21:33:47 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Stefan Israelsson Tampe <address@hidden> 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
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |