bug-guile
[Top][All Lists]
Advanced

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

bug#39811: Missing dynwind exit application


From: Andy Wingo
Subject: 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





reply via email to

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