[ENH] HaltNotAnError-ajh (was: Exception handling question)
Roel Wuyts
wuyts at iam.unibe.ch
Wed Aug 6 07:39:19 UTC 2003
Great. Nice benefit that another #isKindOf: test is gone!
On Tuesday, Aug 5, 2003, at 17:56 Europe/Zurich, Anthony Hannan wrote:
>> From preamble:
> Halt was being treated as a special case in Exception class >>
> #handles:
> to avoid being handled by error handlers. This changeset removes Halt
> as a subclass of Error making it an indendent exception class (direct
> subclass of Exception), and removes the special case test from
> #handles:.
>
> Roel Wuyts <wuyts at iam.unibe.ch> wrote:
>> Aha. So who would be willing to change it? I don't feel comfortable
>> with
>> doing it myself, unless there are enough unit tests around...
>>
>> On Monday, Aug 4, 2003, at 19:00 Europe/Zurich, Anthony Hannan wrote:
>>>>> The most important point however is that Exception DOES NOT
>>>>> handle Halt (in spite of the fact that Halt is a subclass of
>>>>> Exception.)
>>>> Can somebody motivate this decision (or whether it is an
>>>> unintentional
>>>> bug)?
>>>
>>> I'm not the author but I believe the reason is so "self halt" will
>>> always halt and not be accidentally handled by a earlier Error
>>> handler.
>>> The better solution is probably to not make Halt a subclass of Error
>>> but just a direct subclass of Exception.
> <HaltNotAnError-ajh.cs>
>
Roel Wuyts Software
Composition Group
roel.wuyts at iam.unibe.ch University of Bern,
Switzerland
http://www.iam.unibe.ch/~wuyts/
Board Member of the European Smalltalk User Group: www.esug.org
More information about the Squeak-dev
mailing list
|