commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: svn commit: r1034457 - in /commons/proper/math/branches/MATH_2_X/src: main/java/org/apache/commons/math/ main/java/org/apache/commons/math/exception/ main/java/org/apache/commons/math/linear/ main/java/org/apache/commons/math/ode/ site/xdoc/
Date Fri, 12 Nov 2010 21:50:53 GMT

> > [..]
> >>>> I'll change the constructors to replace the String with Localizable
> >>>> per the new localization scheme (which is already in place in 2.X branch).
> >>>
> >>> Do you think that it is necessary, given that as a user-level exception,
> >>> there won't probably exist an enum element corresponding to the error?
> >>
> >> Some users already do have their own implementation of the Localizable
> >> interface, with their own enum. We do have this in Orekit for example.
> >> So users are not restricted to the [math] enums.
> > 
> > Hence, I would propose to create a new "MathRuntimeException" (in package
> > "exception") and move all the code currently in "MathIllegalArgumentException"
> > over to that class.
> > Then, "MathIllegalArgumentException" as well as "MathUserException" can
> > inherit from it.
> > 
> > What do you think?
> No problem for me.

OK, I'll do it in trunk. Then you can copy it over to MATH_2_X.

> Do you think this work on exception is over now ? Lots of change have
> been done already and we could perhaps let things stabilize on this.

Sure, but there is still quite some work in order to have all the source
consistent. There are still something like 270 ocurrences of calls to the
old "MathRuntimeException" factory methods, to be changed into direct
instantiation of a new exception object.
Everytime someone encounters such a call, he should check whether there
already exists a new exception that can be used instead; if so, please
replace it (and change the Javadoc, etc.). If not, we should create a new
exception class and proceed with the replacement.


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

View raw message