Package org.apache.commons.math.fraction
Class FractionConversionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.commons.math.MathException
-
- org.apache.commons.math.ConvergenceException
-
- org.apache.commons.math.fraction.FractionConversionException
-
- All Implemented Interfaces:
java.io.Serializable
,MathThrowable
public class FractionConversionException extends ConvergenceException
Error thrown when a double value cannot be converted to a fraction in the allowed number of iterations.- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FractionConversionException(double value, int maxIterations)
Constructs an exception with specified formatted detail message.FractionConversionException(double value, long p, long q)
Constructs an exception with specified formatted detail message.
-
Method Summary
-
Methods inherited from class org.apache.commons.math.MathException
getArguments, getGeneralPattern, getLocalizedMessage, getMessage, getMessage, getPattern, getSpecificPattern, printStackTrace, printStackTrace
-
-
-
-
Constructor Detail
-
FractionConversionException
public FractionConversionException(double value, int maxIterations)
Constructs an exception with specified formatted detail message. Message formatting is delegated toMessageFormat
.- Parameters:
value
- double value to convertmaxIterations
- maximal number of iterations allowed
-
FractionConversionException
public FractionConversionException(double value, long p, long q)
Constructs an exception with specified formatted detail message. Message formatting is delegated toMessageFormat
.- Parameters:
value
- double value to convertp
- current numeratorq
- current denominator
-
-