commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] RegressionModelSpecificationException
Date Thu, 21 Jul 2011 19:42:23 GMT
On 7/21/11 11:18 AM, Gilles Sadowski wrote:
> 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
> ---CUT---
> import org.apache.commons.math.exception.MathIllegalArgumentException;
>  // ...
>  throw new MathIllegalArgumentException(LocalizedFormats.INVALID_REGRESSION_ARRAY,
>                                         data.length, nobs, nvars);
> ---CUT---
>
> However, if many of the new classes are going to contain similar statements,
> maybe that a new "RegressionException" is warranted.

That is what I was suggesting above - to get rid of the deprecated
stuff and replace with a new exception that would extend
MathIllegalArgumentException.

Phil
>  
>> [...]
> Thanks,
> Gilles
>
> ---------------------------------------------------------------------
> 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