Exception Hierarchies

Alan Lovejoy sourcery at pacbell.net
Mon Aug 16 19:51:24 UTC 1999


> ** Original Sender: Florin Mateoc <Florin at integral.com>
> Just a short protest for having Halt and UserInterrupt as Errors. They are
> not errors and they should not be caught by a generic error handler.

I'll second this opinion.

I also did not notice anything corresponding to  VW's "NoHandlerSignal"
in the hierarchy.  It is essential in cases where you only want to handle an
exception if there is no other handler up the call chain.  The mechanism
is as follows: if the exception machinery finds no handler for an exception
after having searched the whole sender chain, it raises the NoHandler
exception (starting with the same initial activation frame where the original
exception was raised).  Only if there is no handler for the NoHandler
exception does the default ("emergency") exception handler get invoked
(and that's why the error message in this case is "Unhandled exception: ...").

The NoHandlerSignal idea was invented by Mike Malcolm, if I remember
correctly.

--Alan





More information about the Squeak-dev mailing list