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

CATCH-ALL



MacLISP and ZetaLisp (Symbolics LISP Machine) had/have that feature too.
CATCH-ALL was/is a macro that generates the appropriate (:CATCH NIL form).
But the ZetaLisp manual says if you think you need this you probably want
UNWIND-PROTECT instead.
Perhaps what we really need is an extra feature in UNWIND-PROTECT, whereby
the cleaup forms can find out why they are being called. Some global
variable can be SETQ'd by the unwinding mechanism, to NIL in the case of
falling out of the main form nomally, to ERROR in the case of an error
signal that is being passed up to an errset, or to the tag if a THROW
is happening. This would give the cleanup form the opportunity to
intercept certain tags in the same way CATCH-ALL did in MacLISP, but
maybe be a bit cleaner? Or maybe we really need CATCH-ALL because it
woul be cleaner than the enhanced UNWIND-PROTECT. Esthetic opinion anybody?
-------