guile-user
[Top][All Lists]
Advanced

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

Re: Exception handler installed when handling a continuable exception


From: Vivien Kraus
Subject: Re: Exception handler installed when handling a continuable exception
Date: Thu, 30 Sep 2021 23:39:26 +0200
User-agent: Evolution 3.34.2

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 via email to

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