unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
Cc: 39811-close@debbugs.gnu.org
Subject: bug#39811: Missing dynwind exit application
Date: Tue, 03 Mar 2020 21:33:47 +0100	[thread overview]
Message-ID: <87r1y918lw.fsf@igalia.com> (raw)
In-Reply-To: <CAGua6m2ez-P3Bic=2kBgNf-QzYAiGbA0Zkms9A5XE-VaOEbQ1Q@mail.gmail.com> (Stefan Israelsson Tampe's message of "Thu, 27 Feb 2020 19:59:25 +0100")

Stefan Israelsson Tampe <stefan.itampe@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





      reply	other threads:[~2020-03-03 20:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 18:59 bug#39811: Missing dynwind exit application Stefan Israelsson Tampe
2020-03-03 20:33 ` Andy Wingo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1y918lw.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=39811-close@debbugs.gnu.org \
    --cc=stefan.itampe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).