[Biojava-l] log4j
hilmar.lapp@pharma.Novartis.com
hilmar.lapp@pharma.Novartis.com
Wed, 12 Jul 2000 14:40:05 +0100
Sent by: biojava-l-admin@biojava.org
To: Gerald.Loeffler@vienna.at
cc: Biojava-l@biojava.org
Subject: Re: [Biojava-l] log4j
for the core code. Any exceptional circumstances (errors, warnings etc)
should realy be handled using exceptions. Any feed-back information should
be propogated with events & listeners. If we structure the code correctly,
exceptions can be caught, logged, and recovered from in a client-dependant
way.
Basically, I agree. From my experience, there's a problem with
triggering exceptions in the case of batch operations, like 'annotate
all seqs a database object returns'. You as a client don't want to
abort the called method at a particular sequence raising an exception
unless you can easily resume the operation, something which is often
not the case. What I did is to propagate such exceptions as events,
that is, create an ExceptionHandler interface, and methods carrying
out batch operations which are supposed not to fail on the first
exception now call an ExceptionHandler, and resume or abort based on
what the handler returns.
Hilmar