TextIO.closeOut failure

Henry Cejtin henry@sourcelight.com
Tue, 5 Dec 2000 19:49:21 -0600


In C, stdio sets the FILE * as having gotten an error.  This leaves it in a
state which ignores all attempts to do anything to it (returning an error
indication) until clearerr is called on it.  Not great.
Basically I don't think it matters much, as long as the exception is thrown.
I guess that the best thing would be to not close it and leave it so that
another attempt to close it will try the write again.  This way the program
might (unlikely, but possible) be able to do some kind of recovery.
(The case I'm thinking of is file system full, so you could remove some other
files and then try again to write out the final part.)