[Q] What is the reason for raise one error trying to save a new file ?

Doug Way dway at mailcan.com
Thu Nov 4 16:13:11 UTC 2004


On Thu, 4 Nov 2004 06:48:11 -0800, "Ned Konz" <ned at squeakland.org> said:
> On Thursday 04 November 2004 5:15 am, Lic. Edgar J. De Cleene wrote:
> > I copy from image and this code perhaps belongs to Tim Rowledge .
> > I not could figure why you choose raise one error if file do not exist.
> > It¹s not what we wish to do using this method ?
> 
> Because the exception is only raised after we have tried once to create
> the file and failed.

Yes, it's easy to miss the "self new" in there, which tries to create a
new file.  (I missed it at first glance.)  Probably that first comment
should say "Failed to open the newly created file" instead, to be more
clear.

- Doug



More information about the Squeak-dev mailing list