[BUG][FIX] File out empty change set results in a dangling file h andle

Norton, Chris chrisn at Kronos.com
Sat Jul 1 00:06:40 UTC 2000


Steps to reproduce:
1.  From the "changes..." menu, choose "create new change set..."
2.  Name the set and Accept it.
3.  From the "changes..." menu, choose "file out current change set"
Result:  Notifier "Warning: no changes to file out"

Tracing the code led me to ChangeSet.fileOut.  This method, as you might
expect, files out your active changeset.  Unfortunately, if an error occurs
during the filing out of the code, you end up with an open file that doesn't
get closed.

I've fixed this problem by wrapping the file handling code in an ensure:
block.  Now that we have Exception Handling, I think that we should probably
start bullet-proofing Squeak's file handling code (I believe that this is
the 3rd one I've cleaned up since the TFEI Exception Handler stuff was
added).

Cheers,

---==> Chris

PS>  On a related note, does anyone have a utility that closes dangling file
handles (like VSE's FileHandle.closeHandles)?  Thanks!

 <<ChangeSet-fileOut.1.cs.gz>> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeSet-fileOut.1.cs.gz
Type: application/octet-stream
Size: 980 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000630/f0d2b4ed/ChangeSet-fileOut.1.cs.obj


More information about the Squeak-dev mailing list