On #ifError: considered harmful was Re: Set>>add:

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Thu Nov 14 13:43:01 UTC 2002


John Sarkela <sarkela at cox.net> wrote:
[SNIP]
> Issues:
> 
> There are issues in the base image that need rectification and are the 
> motivation for the
> subject line of this message. In the Squeak exception mechanism, it is 
> never appropriate
> to send the #ifError: message, nor is it appropriate to ever set a 
> handler on Exception or
> Error unless the handler passes the exception after intercept.

Very interesting!

> (Note: consider the design intention behind the #ifCurtailed: message. 
[SNIP of solid stuff]

Just one little observation: "ifCurtailed:" may sound obvious to the
native english speaking developers but I haven't really understood what
it meant until recently. Merriam-Webster told me though. If I have
understood this correctly it means "ifAbnormallyTerminated:" or
something similar and refers to the fact that the intended call chain
was for some reason prematurely cut short - just like you can do with a
dog's tail (which is forbidden in Sweden by the way).

This may be one reason so few use it - there is only one sender in this
image (running Celeste) for example. But there are numerous senders of
ifError: and people tend to copycat - that's what I have been doing at
least.

Someday I really need to sit down and read through the ANSI standard...
too bad it's so boring to read! :-)

regards, Göran




More information about the Squeak-dev mailing list