Exception handling question

Stephen Pair stephen at pairhome.net
Mon Aug 4 17:13:46 UTC 2003


Anthony Hannan wrote:

>Roel Wuyts <wuyts at iam.unibe.ch> 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.
>

Or, don't signal an exception at all...why not make #halt do what is 
says and just #halt the process and open a debugger...I've never 
understood why you'd want #halt to raise an exception.  You never want 
to handle it and you always want to it stop the current process and open 
a debugger...so, what's the point in signaling an exception?

- Stephen





More information about the Squeak-dev mailing list