unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Catching arbitrary throws
@ 2024-03-07 23:10 Thuna
  2024-03-08  7:18 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Thuna @ 2024-03-07 23:10 UTC (permalink / raw)
  To: help-gnu-emacs

Is there an equivalent of `condition-case' for throws?  I am
specifically looking to catch any and all throws, as though with the
symbol `t' in `condition-case'.

Catching `cl-return-from' only would work for my purposes as well (with
some `cl-define-compiler-macro' magic, perhaps, though I have not looked
into it much) but I would prefer a general solution.

It might also be possible to do something with `unwind-protect', which
does activate with throws, but I need to have access to the thrown
symbol and value and I don't know how to do that.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Catching arbitrary throws
  2024-03-07 23:10 Catching arbitrary throws Thuna
@ 2024-03-08  7:18 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-03-08  7:18 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Thuna <thuna.cing@gmail.com>
> Date: Fri, 08 Mar 2024 00:10:39 +0100
> 
> Is there an equivalent of `condition-case' for throws?  I am
> specifically looking to catch any and all throws, as though with the
> symbol `t' in `condition-case'.

It isn't clear whether you want to catch even those throw's which have
a matching 'catch' (with the same TAG), or do you want to catch only
those throw's for which there's no matching 'catch'?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-08  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-07 23:10 Catching arbitrary throws Thuna
2024-03-08  7:18 ` Eli Zaretskii

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).