Module org.firebirdsql.jaybird
Package org.firebirdsql.extern.decimal

# Class DecimalInconvertibleException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.ArithmeticException
org.firebirdsql.extern.decimal.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:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`DecimalInconvertibleException(String message, DecimalType decimalType, int signum)`

## Method Summary

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