Dealing With Exceptions

Stephen Pair spair at
Tue Aug 17 13:46:45 UTC 1999

Having used the TFEI exception framework for a little while now, I have the
following comments:

1.  The default action in a handler block is to return if the exeception is
not resumable and resume if it is.  I think this could lead to confusion
when examining the handling code.  My own expectation is that the handler
would return by default.  Perhaps this is an ANSI standard issue.

2.  It appears that handlers handle exeptions signaled in the handled block
as well as the handler block.  For example, in the following:

[ Error signal ] on: Error do: [ :ex |
	Transcript show: 'error'; cr; endEntry.
	Error signal.

I would expect that the first "Error signal" would be handled and the second
would not.  In fact, this code produces one 'error' in the transcript and
then gets into some sort of endless loop (it looks like it's trying to
handle the second "Error signal").

On the #halt issue, my experience is that it is best to treat #halt as
simply that, not an exception.

Also, Dolphin has done a nice job of allowing instance based exceptions to
co-exist with class based ANSI standard exceptions.  It would be nice if
Squeak had this as well.  Without instance based exceptions, you start to
get a lot of exception classes proliferating in the system dictionary.
Perhaps if we could create the exception classes in an anonymous way, that
would do the job (in fact, maybe this is another good reason for having name

The exception handling system is a great addition to Squeak.  Thanks to all
that have worked to make it happen!

- Stephen

More information about the Squeak-dev mailing list