Found an exception workaround

Roel Wuyts wuyts at iam.unibe.ch
Wed Aug 6 13:44:45 UTC 2003


For your information, the following expression is a workaround for 
capturing any kind of exceptions (including halts):

     [self halt: 'a halt'] on: Halt, Exception do: [:exc | Transcript 
show: exc class name; cr].

This will indeed capture a Halt as a Halt (and not as an 
UnhandledError), and any other exception as that kind of exception. 
While waiting for Anthony Hannan's enhancement to make it into an 
image, I am using this trick/hack/workaround.

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