commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject [math] Eliminating MaxIterationsExceededException
Date Mon, 29 Nov 2010 00:16:29 GMT
Completing the fix for MATH-414, I saw that ContinuedFraction still throws
MaxIterationsExceededException.  I thought it would be good to eliminate the
use of the deprecated exception in trunk, but I got stuck because the
replacement, MaxCountExceededException does not allow the initial argument
to be passed and reported in the message.  In ContinuedFraction, we have
{code}
if (n >= maxIterations) {
            throw new MaxIterationsExceededException(maxIterations,
                LocalizedFormats.NON_CONVERGENT_CONTINUED_FRACTION,
                x);
 }
{code}

but MaxIterationsExceededException does not allow x to be passed in.  Should
we add a constructor similar to what MaxIterationsExceededException has
taking an Object[] to hold additional message parameters?

Phil

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message