About Exception
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Thu Apr 7 10:01:44 UTC 2005
=?ISO-8859-1?Q?st=E9phane_ducasse?= <ducasse at iam.unibe.ch> wrote:
> Hi guys
>
> A friend on mine asked me about the following
>
> Compiler evaluate:'1'
> 1
>
> [Compiler evaluate:'1'] on: Exception do: [ :ex | -1 ]
> -1
>
> I do not understand why the exception is raised
>
> [Compiler evaluate:'1'] on: Error do: [ :ex | -1 ]
>
> 1
>
> Of course Exception is mentally for me an abstract class but I do not
> understand
> why this has an influence.
> Any idea?
Well, on: Exception catches all subclasses of Exception, but on: Error
is more specific and excludes Notifications for example (in this example
you get an InMidstOfFileinNotification).
Or am I misunderstanding the question?
The InMidstOfFileinNotification is a fancy way of checking from low
level code if you are in filein operation - if noone handles it the
default action is executed which answers false.
regards, Göran
More information about the Squeak-dev
mailing list
|