EndOfStream an Error???
Stefan Matthias Aust
sma at 3plus4.de
Wed May 24 17:42:38 UTC 2000
At 15:19 24.05.00 +0200, Helge Horch wrote:
>At 23:23 23.05.2000 -0700, Andreas Raab wrote:
>>Just wondering: Who came up with the idea that EndOfStream is an error?!
>
>I'm the one to be blamed here.
And I added it to the updates - so it's not Helge's fault alone. I stil
think, his change is a step in the right direction, however I didn't
realize the implication Andreas pointed out. Therefore, I'd recomment to
undo the change for 2.8 and then use 2.9a to iron out all problems related
to that change.
IMHO the whole exception framework needs to be fleshed out. Currently,
it's basically always an Error which is raised, be it a #primitiveFailed,
or an #error: or whatever. More different kinds of errors need to be
defined than could then be used in #on:do: messages. This will probably
reduce number of occurrences of the problem Andreas described.
Making the EndOfStream thing an Exception, not an Error is the other
workaround we could apply now. Still, I think it _is_ and error. It's the
same kind of thing as if you'd do
i := 0. a := Arraw new: 10.
[[Transcript show: (a at: (i := i + 1))] repeat] on: Error do: [:ex | ]
to enumerate an array. Actually, here an IndexOutOfBounds exception or
something similar should be raised.
bye
--
Stefan Matthias Aust // ...dancing on the dark side of moon
More information about the Squeak-dev
mailing list
|