Class FractionConversionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
org.apache.commons.math3.exception.MathIllegalStateException
org.apache.commons.math3.exception.ConvergenceException
org.apache.commons.math3.fraction.FractionConversionException
- All Implemented Interfaces:
Serializable
,ExceptionContextProvider
Error thrown when a double value cannot be converted to a fraction
in the allowed number of iterations.
- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFractionConversionException
(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.math3.exception.MathIllegalStateException
getContext, getLocalizedMessage, getMessage
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
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
-