Hi.

> > [...]
> >> +      MathIllegalArgumentException should only be thrown in situations
> >> +      where preconditions can be exhaustively provided so that what 
> >> arguments
> >> +      are "illegal" can be specified fully to the caller. Domain-specific
> >> +      exceptions need to be defined for cases where failures cannot be
> >> +      attributed to parameter precondition violation. For example, the 
> >> exact
> >> +      domain of successful activation of a solver or quadrature method 
> >> may be
> >> +      impossible to specify because of numerical properties of the method.
> >> +      If a solver fails to find a root or a quadrature method fails to 
> >> converge
> >> +      for a given set of parameters, <i>unless those parameters violate 
> >> the
> >> +      advertised preconditions</i> it is not appropriate to throw
> >> +      MathIllegalArgumentException.</li>
> >
> >  If the failure results from an exception thrown by user code (e.g. an
> >  exception is thrown while a solver is evaluating a user-defined function),
> >  the Commons Math code must let it propagate without interference.
> 
> That may not be possible in general.
> 
> If the user code generates an Exception that CM already handles, how
> can CM distinguish this case?

In general, I think that such a code is going to create headaches.

But let's discuss from a specific example. Do you have one?


Regards,
Gilles

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

Reply via email to