Exception handling question

Roel Wuyts wuyts at iam.unibe.ch
Sat Aug 2 13:11:58 UTC 2003


Hello,
I am trying out some things under 3.6 (updated till #5373).

The following statements did exactly what I thought they would:
     [self error: 'an error'] on: Error do: [:exc | Transcript show: exc 
class name; cr].
     [self halt: 'a halt'] on: Halt do: [:exc | Transcript show: exc 
class name; cr].
They print 'Error' and 'Halt' on the Transcript.

But the following ones did not do what I expected:
     [self error: 'an error'] on: Exception do: [:exc | Transcript show: 
exc class name; cr].
     [self halt: 'a halt'] on: Exception do: [:exc | Transcript show: 
exc class name; cr].
It prints 'Error' and then (this is what I consider weird) 
'UnhandledError' ?!

I don't know enough to say whether this is a feature, a bug, or my 
complete misunderstanding :-) Can somebody enlighten me?

--
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