[Pharo-project] Improving Pharo's Exception Hierarchy

Dale Henrichs dhenrich at vmware.com
Thu Apr 14 21:54:06 CEST 2011


On 04/14/2011 12:04 PM, Henrik Sperre Johansen wrote:
> On 14.04.2011 20:52, Dale Henrichs wrote:
>> Stef,
>>
>> For rangeError the code would look like this:
>>
>>    [
>>    (NumericError new)
>>      reason: #rangeError;
>>      signal: 'access out of bounds'
>>    ]
>>      on: NumericError
>>      do: [:ex |
>>        ex reasonCode == #rangeError
>>          ifTrue: [ "do your thang" ]
>>          ifFalse: [ ex pass ]].
>>
>> Dale
>
> Why not use #tag, which is already ANSI?
>
> Cheers,
> Henry
>

At GemStone we decided not to use tag (we had several cats to skin), but 
tag could certainly be used...

Dale



More information about the Pharo-project mailing list