commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: [math] RegressionModelSpecificationException
Date Thu, 21 Jul 2011 18:18:09 GMT
On Thu, Jul 21, 2011 at 10:48:40AM -0700, Phil Steitz wrote:
> I propose that we add this to replace the generic math IAE that we
> throw in various places, e.g. in AbstractMLR#newSampleData,
> throw MathRuntimeException.createIllegalArgumentException(
>                     LocalizedFormats.INVALID_REGRESSION_ARRAY,
> data.length, nobs, nvars);

This way of generating exceptions is deprecated (as are classes
"o.a.c.math.MathException" and "o.a.c.math.MathRuntimeException").

Please make it
import org.apache.commons.math.exception.MathIllegalArgumentException;
 // ...
 throw new MathIllegalArgumentException(LocalizedFormats.INVALID_REGRESSION_ARRAY,
                                        data.length, nobs, nvars);

However, if many of the new classes are going to contain similar statements,
maybe that a new "RegressionException" is warranted.
> [...]


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

View raw message