commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: [all][math] Help wanted with exceptions API design
Date Tue, 01 Feb 2011 23:16:11 GMT
> > > > The currently defined exceptions in [math] can be found in the
> > > > top-level package and .exceptions.  Those in the top-level have at
> > > > this point been deprecated.
> Don't package your exceptions in a package called ".exceptions". That is very odd.


> The exception should be defined where they are used.

What do you do for exceptions that are used in several classes and several

> As I and others have suggested: reuse existing stock exceptions. Only create exceptions
classes if you must.

Depending on the requirements, the exceptions we created may be more

> If you consider creating an exception, especially in a hierarchy, think: why would I
want to CATCH this exception as opposed to a superclass?

I don't agree because I don't consider from that stand-point. IMHO, the
exception is useful if it conveys a problem as specifically as possible.
The caller is free to catch, or not, whatever he likes.


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

View raw message