On Sat, Jan 15, 2011 at 3:36 PM, Luc Maisonobe <luc.maison...@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-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org