commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@carmanconsulting.com
Subject Re: [math] Exceptions again...
Date Fri, 26 Sep 2003 20:16:39 GMT
Why not just use NestableException in Commons Lang?

----- Original Message ----- 
From: "J.Pietschmann" <j3322ptm@yahoo.de>
To: <commons-dev@jakarta.apache.org>
Sent: Friday, September 26, 2003 4:13 PM
Subject: [math] Exceptions again...


> Hi,
> I found that [math] still wont compile on JDK 1.3 due to the
> super(throwable) constructors in MathException. Should we just write
> off 1.3 users, now that a reasonable 1.4 is available on basically
> all platforms which run Java at all?
> Unless I'm mistaken, Brent's patch contained some corrections for
> this problem.
> 
> Further, there still wasn't a conclusion on what to do with
> analysis.ConvergenceException, which is used in util.ContinuedFraction
> only, and also is a RuntimeException instead of a checked Exception.
> 
> Point one: given the current code, it seems to be misplaced.
> 
> Point two: Falling out of the loops in the root finders actually
> indicates a convergence problem (either too stringent accuracy settings,
> ill conditioned functions causing oscillations or a bug in the algorithm)
> I'd like to use a ConvergenceException for this condition too, however,
> throwing a mix of checked and unchecked exceptions for conditions of
> comparable complexity is something I'd rather avoid.
> 
> Possible solutions:
> 1. abolish ConvergenceException completely and replace it in
>   ContinuedFraction by a (checked) MathException. This will cause
>   adding a "throws MathException" in a heck of a lot of places,
>   including on gamma and beta functions and everywhere they are used.
>   The discussion whether the kind of functions should throw a checked
>   exception wans't conclusive yet.
> 2. derive ConvergenceException from MathException (and palce it in
>   [math] root), further see above.
> 3. make MathException a runtime exception and replace
>   ConvergenceException with a MathException.
> 4. make MathException a runtime exception and derive
>    ConvergenceException from MathException.
> 5. Leave as is but move ConvergenceExcpetion to [math] root
> 6. as 5 but move to [math]/util
> 
> Any ideas/recomendations/votes?
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 

Mime
View raw message