public class CurrencyConversionException extends MonetaryException
Constructor and Description |
---|
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext)
Constructs an
CurrencyConversionException with the specified
source and target currency. |
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext,
java.lang.String message)
Constructs an
CurrencyConversionException with the specified
detail message, timestamp, source and target currency. |
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext,
java.lang.String message,
java.lang.Throwable cause)
Constructs a new exception with the specified source and target currency,
detail message and cause.
|
Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
getBase()
Gets the first currency at fault.
|
ConversionContext |
getConversionContext()
Gets the queried timestamp at fault.
|
CurrencyUnit |
getTerm()
Gets the second currency at fault.
|
java.lang.String |
toString() |
public CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext)
CurrencyConversionException
with the specified
source and target currency.base
- the source currency, may be null.term
- the target currency, may be null.public CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext, java.lang.String message)
CurrencyConversionException
with the specified
detail message, timestamp, source and target currency.base
- the source currency, may be null.term
- the target currency, may be null.message
- the detail message.public CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext, java.lang.String message, java.lang.Throwable cause)
Note that the detail message associated with cause
is
not automatically incorporated in this exception's detail message.
base
- the source currency, may be null.term
- the target currency, may be null.message
- the detail message (which is saved for later retrieval by the
Throwable.getMessage()
method).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value
is permitted, and indicates that the cause is nonexistent or
unknown.)public CurrencyUnit getBase()
public ConversionContext getConversionContext()
null
.public CurrencyUnit getTerm()
public java.lang.String toString()
toString
in class java.lang.Throwable