ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: Purpose of FileUtils.close(...)
Date Tue, 25 Jan 2005 00:52:55 GMT
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 
>; 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?


Jesse Glick <> x22801
NetBeans, Open APIs  <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message