(I'm just catching up on 3 weeks worth of mail, sorry for joining in late)

>> So what exactly *is* the intention of this method? [...]

We wrote it because we were repeating the same code throughout exception handling logic: closing files and swallowing exceptions.

try {
 file=myfile.open();
 ...
 file.close();

 } finally {
 if(file!=null) {
  try { file.close(); } catch(IOException ioe) { }
 }


Now, if you eliminate the file.close() from the main clause, the finally will do the work for you, but it will swallow any exceptions. Which was not the original intent, but something we clearly have enabled.


Perhaps we should always log trouble on the way out -one advantage of having the code in one place is that we do have only one point to instrument.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to