[Biojava-l] Nested Errors and Nested Exceptions
Thomas Down
td2@sanger.ac.uk
Thu, 15 Mar 2001 21:41:01 +0000
On Fri, Mar 16, 2001 at 08:31:26AM +1300, Schreiber, Mark wrote:
> Hi,
>
> Sorry if this has been covered before (I think it has) but when is it
> reccommended that nested errors and nested exceptions be used. They seem to
> be a useful "catch all", is this actually what they are for?
All new exception types created for BioJava are sub-classes of
NestedException (since it offers useful, general-purpose functionality).
(once you've got used to them, trying to debug code without them
is a nightmare...)
Generally, catching NestedException isn't a hugely meaningful thing
to do (in most BioJava context's it's effectively the same as just
catching Exception), but I know it happens in a few places. I guess
that's mainly a consequence of ChangeVetoException not being
a subclass of BioException.
Thomas