This came up before, but I forgot what the consensus was (been a while
since I've had time to play with Ant). Whenever FileUtils.close() is
used, any resulting exceptions are swallowed and no logging is
performed. I'd like to propose that instead of this "silent death" for
close, that there is instead a record of what happened, but that the
record is voluntary
--FileUtils
/**
* Close a stream without throwing any exception.
* Record message on tasks log for tracability
* @param device stream, can be null
* @param user task calling this method
* @param message message to log in case of IOException
*/
public static void close(OutputStream device, Task user, String
message) {
if (device != null) {
try {
device.close();
} catch (IOException ioex) {
user.log(message);
}
}
}
In use...
} finally {
FileUtils.close(os, this, "Failed to close output stream
during method foo");
}
thoughts/abuse??
Kev
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]