Class DecimalInconvertibleException

All Implemented Interfaces:
Serializable

public class DecimalInconvertibleException extends 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:
  • Constructor Details

    • DecimalInconvertibleException

      public DecimalInconvertibleException(String message, DecimalType decimalType, int signum)
  • Method Details

    • 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.