Blair,
thanks for clarifying this. BTW: what is the difference between:
result := [FileStream read: 'something'] on: Error do: [:ex | ].
and:
result := [FileStream read: 'something'] on: Error do: [:ex | ex return:
nil].
Both seem to work the same way.
Best regards,
David
"Blair McGlashan" <blair@no spam object-arts.com> wrote in message
news:
[hidden email]...
> David
>
> You wrote in message news:
[hidden email]...
> > Hello all,
> >
> > I notice a minor bug in 5.1, the workaround is simple but anyway here it
> is:
> >
> > The following code will block Dolphin 5.1 process with 100% CPU
> utilization.
> >
> > | fileStream |
> > [fileStream := FileStream read: 'non-existing file'] on: Error do: [:ex
|
> ex
> > exit: 'my result'].
> >
> > This worked without problems on Dolphin 5.0.
>
> This isn't a bug, but a consequence of enhancement #1210 (see the release
> notes). In summary FileExceptions resulting from failed file opens are now
> resumable, and when resumed the file open is retried. Since the
non-standard
> Exception>>exit: message will resume a resumable error, and not exit from
> the handler block, the expression above will loop infinitely. To be
certain
> of returning from the handler block use the ANSI standard #return:
message.
>
> Regards
>
> Blair
>
>