PING...
--- Matt Benson <[EMAIL PROTECTED]> wrote:
[SNIP]
> In
> talking about whether caught Exceptions should at
> least be logged, Jesse mentioned "disk full" as an
> example.  We actually have a bugrep (32676) about
> full
> directories, and I found a blog today on which a
> German fellow has posted 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.

Any more opinions on this? We could add this to
LazyFileOutputStream and check whether performance
degrades as Jesse has mentioned he fears.

>  But it won't help
> anything unless we log Exceptions from
> FileUtils.close(*)... So I am for at least writing
> to
> System.err .
> 
> Another thought:  We could create an AntThread class
> to tie a Thread to a Project.  Most places that
> currently use Thread constructors would use the same
> AntThread constructor.  The top-level AntThread
> could
> be constructed with an explicit Project; others
> could
> inherit the Project from the AntThread along whose
> path of execution the child AntThreads were created.
> 

I have been playing with this... I renamed the class
ProjectThread, but the concept is the same.  It seems
like the perfect mechanism to log from e.g.
StreamPumper, which not only has no Project of its
own, but because it is designed to run in a Thread, is
ill-advised to throw Exceptions.  But this seems like
kind of an unorthodox addition to the codebase, so I
wanted to get some feedback.

Thanks,
Matt



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to