Class DecimalInconvertibleException

  • All Implemented Interfaces:
    java.io.Serializable

    public class DecimalInconvertibleException
    extends java.lang.ArithmeticException
    Thrown to indicate a decimal value could not be converted to a target type (usually BigDecimal).

    This exception should only be thrown for cases when the DecimalType other than DecimalType.FINITE cannot be represented in the target type. That is, if the target type does not support Infinity and/or NaN.

    This exception should not be thrown for cases where the target type supports NaN, but does not support signalling NaN. In that situation, NaN should be returned.

    Author:
    Mark Rotteveel
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DecimalType getDecimalType()  
      int getSignum()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DecimalInconvertibleException

        public DecimalInconvertibleException​(java.lang.String message,
                                             DecimalType decimalType,
                                             int signum)
    • Method Detail

      • getDecimalType

        public DecimalType getDecimalType()
        Returns:
        Decimal type of the value that could not be converted.
      • getSignum

        public int getSignum()
        Returns:
        Signum of the value that could not be converted.