commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject [math] Re: creating internal errors
Date Sun, 16 Jan 2011 17:09:16 GMT
On Sat, Jan 15, 2011 at 3:36 PM, Luc Maisonobe <Luc.Maisonobe@free.fr> wrote:
> Hi all,
>
> With the exception refactoring, MathRuntimeException has been deprecated
> in branch 2.X (but it is neither deprecated nor deleted in trunk for now
> ...).
>
> This class did include a createInternalError static method that is
> useful in defensive programming for difficult cases. It is used at 4
> different places in branch 2.X and could be used in other places too (I
> generally place one such thing in the default statement of a switch case
> when all cases are known to be handled, as a security layer for later
> changes in the number of cases).
>
> So I propose to add a dedicated exception for this feature, probably
> inheriting from MathIllegalStateException.
>
> Any thoughts ?

Need to be careful not to over-use, backsliding into "the old ways" ;)
 but I am fine with this and see MathIllegalStateException as the
right abstraction for the kinds of uses in the 2.x code.

Phil
> Luc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message