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

Universal Catch



    Date: Tue 19 Nov 85 14:45:20-MST
    From: Robert R. Kessler <KESSLER@UTAH-20.ARPA>

    One of the "features" of PSL is that if the tag of a catch is NIL, then
    that catch will catch any throw.  This feature is especially nice when
    writing top loops and similar functions that you want to permit
    arbitrary interaction with throws.  Does CL provide a similar functionality
    (I haven't seen anything similar in the manual)?  Is it an extension that
    might be included in CL-86 (or whatever we call it)?  Comments?

I don't understand how this helps write "top loops".
It sure makes it hard to figure out why your program suddenly
quit to top level because somewhere you misspelled HEIRARCHY
in a THROW.  It's much more useful if it is an error.

I can think of other arbitrary interactions you could permit
with THROW; why is this one any better? ;-)

I think what you are really looking for here is a "catch-barrier",
which says "never throw above here", so you don't accidentally
throw out of your breakpoint or debugger?  I think that's better,
but it makes it harder to deliberatly continue by throwing out
to some tag.  If I remember right, I think NIL has such a feature.