unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Vivien Kraus via General Guile related discussions <guile-user@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>, guile-user@gnu.org
Subject: Re: Exception handler installed when handling a continuable exception
Date: Thu, 30 Sep 2021 23:39:26 +0200	[thread overview]
Message-ID: <d4d8b65d43aab0ee800e06dc6dccb7231c3efc65.camel@planete-kraus.eu> (raw)
In-Reply-To: <986e0a16d3b1197142986916235090ae94c8e245.camel@telenet.be>

Hello, I finally figured it out:

Le mercredi 25 août 2021 à 21:08 +0200, Maxime Devos a écrit :
> This also happens without #:continuable?.
> Here's a simpler test case:
> 
> (with-exception-handler
>   (lambda (exn)
>     (catch #t
>       (lambda () (error "to be caught"))
>       (lambda e (pk 'caught! e))))
>   (lambda () (error "oops")))
> ---> In procedure raise-exceptiont: to be caught
> 
> I don't know if this is a bug.
It is not, it was in the documentation the whole time. The effective
handler is the outmost handler, unless #:unwind? is #t. I was tricked
by the obscure scheme jargon, but this works as expected:

(with-exception-handler
  (lambda (exn)
    (catch #t
      (lambda () (error "to be caught"))
      (lambda e (pk 'caught! e))))
  (lambda () (error "oops"))
  #:unwind? #t)




  reply	other threads:[~2021-09-30 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 19:08 Exception handler installed when handling a continuable exception Maxime Devos
2021-09-30 21:39 ` Vivien Kraus via General Guile related discussions [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-09  7:26 Vivien Kraus via General Guile related discussions

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=d4d8b65d43aab0ee800e06dc6dccb7231c3efc65.camel@planete-kraus.eu \
    --to=guile-user@gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=vivien@planete-kraus.eu \
    /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).