[ENH] ReadStream>>next signals EndOfStream
Helge Horch
Helge.Horch at munich.netsurf.de
Fri May 19 02:08:46 UTC 2000
At 22:26 17.05.2000 -0400, Bob Arning wrote:
>As a slight modification, I would suggest
>[...]
> position >= readLimit
> ifTrue: [^EndOfStream signal]
> ifFalse: [^collection at: (position _ position + 1)]
>
>This change allows the exception to be caught and a different value returned.
Thanks again, Bob, for the guidance. I herewith repost the updated
changeset, with "RAA" in the appropriate spots (for credit), and an [ENH]
tag for wider (and automatic) attention.
Should be a useful modification to the mainstream (2.8a/2.9a, whatever),
it's included in the BhrXmlParser distribution as well.
From the preamble:
Change Set: EOS
Date: 18 May 2000
Author: Helge Horch
Requires: Squeak 2.8a
Modifies ReadStream>>next to signal an Error (EndOfStream) on attempts to
read at or beyond the end of the stream. Thanks to Bob Arning (who is
silently credited in the stamps <g>), existing applications relying on
seeing nils should not be affected.
Cheers,
Helge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EOS.6.cs
Type: application/octet-stream
Size: 1502 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000519/a87642df/EOS.6.obj
More information about the Squeak-dev
mailing list
|