unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: Maxime Devos <maximedevos@telenet.be>
Cc: Christopher Baines <mail@cbaines.net>,
	"guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: RE: exception from inside false-if-exception?
Date: Wed, 12 Jun 2024 16:47:17 +0000	[thread overview]
Message-ID: <AejDT3yAX2q7Wsl2sHg69OdgXo1N9NIN7m_tA69jXqfYkFCuQIo_KAVq180FEjFXPYOxhwZS31zxDkEABaavvJALdfbMFzAIPPX2uEyqKG4=@lendvai.name> (raw)
In-Reply-To: <20240506205840.Kuyd2C00E17cfcj01uygoD@xavier.telenet-ops.be>

> >do i get this right? (with-exception-handler ... #:unwind? #f) installs a so called pre-unwind-handler, which takes priority over a false-if-exception, even if deeper in the stack, because f-i-e installs a post-unwind-handler?
> 
> It’s not post-unwind? If anything, I would call it pre-unwind. If with-exception-handler were post all the unwinding, then it’s too late to let raise-continuable return anything.


i didn't properly understand the meaning of pre-unwind and post-unwind handlers when i wrote the above. i thought they are something more peculiar than what they actually are.


> But other than that (“[it] takes priority over a false-if-exception, [...]), that’s my understanding of things.
> 
> I guess what should be done, is it _not_ having priority, and instead it only handling things when there noguard/catch/... inside has caught the exception.


what i didn't understand is that FALSE-IF-EXCEPTION is implemented with a simple CATCH, so its handler should have shadowed my handler. but what actually happens is more sinister, see my other mail with the test case.


> Going by < 9.1 Condition System Concepts | Common Lisp (New) Language Reference (lisp-docs.github.io)>, the API and semantics of CL is pretty much the same as guard/with-exception-handler/raise(-continuable) stuff(*).


yep. with the addendum that CL has two entirely different macros for unwinding and non-unwinding WITH-EXCEPTION-HANDLER. and the handlers are always uninstalled before they are called. and there's no multitude of duplicate primitives for almost identical functionality due to a single revision of the CL standard.


> (I haven’t found search results on what backtrace decorators are in CL.)


this is user code, sorry. it's something we added to be able to decorate backtraces with domain-specific data.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
<hcf> information we gather and create overflows our means of managing it
<hcf> our ppl r only happenstancely synergistic




      parent reply	other threads:[~2024-06-12 16:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  9:06 exception from inside false-if-exception? Attila Lendvai
2024-04-29 14:13 ` bug#46009: " Maxime Devos
2024-04-29 14:22 ` Christopher Baines
2024-04-29 21:42   ` Attila Lendvai
2024-05-06 18:58     ` Maxime Devos
2024-06-12 16:32       ` Attila Lendvai
2024-06-17 19:57         ` Attila Lendvai
2024-06-17 20:50           ` Maxime Devos
2024-06-17 21:45             ` Attila Lendvai
2024-06-19 16:51               ` Maxime Devos
2024-06-19 18:58                 ` Attila Lendvai
2024-06-19 22:03                   ` Maxime Devos
2024-06-12 16:47       ` Attila Lendvai [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='AejDT3yAX2q7Wsl2sHg69OdgXo1N9NIN7m_tA69jXqfYkFCuQIo_KAVq180FEjFXPYOxhwZS31zxDkEABaavvJALdfbMFzAIPPX2uEyqKG4=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=guile-devel@gnu.org \
    --cc=mail@cbaines.net \
    --cc=maximedevos@telenet.be \
    /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).