Matt Benson wrote:
[...] In talking about whether caught Exceptions should at least be
logged, Jesse mentioned "disk full" as an example. [...] I found a
blog today [with] a workaround to detect this condition when writing
with a FOS, using the sync() method of the descriptor available from
the stream. We could insert this in our own FOS deriving from java.io.FOS; we could write our own FileWriter to use an instance of
(hypothetically) oata.util.FOS and force the Exception on full disk.
[...]

This sounds overly complicated to me. Wouldn't it be much easier to use a plain FOS, assume that OutputStream.close() will throw an IOException if something is broken, as its Javadoc says, and if caught rethrow this as a BuildException in the usual way?


-J.

--
Jesse Glick <mailto:[EMAIL PROTECTED]> x22801
NetBeans, Open APIs  <http://www.netbeans.org/>


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



Reply via email to