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,
String message)
Constructs an
CurrencyConversionException with the specified
detail message, timestamp, source and target currency. |
CurrencyConversionException(CurrencyUnit base,
CurrencyUnit term,
ConversionContext conversionContext,
String message,
Throwable cause)
Constructs a new exception with the specified source and target currency,
detail message and cause.
|
Modifier and Type | Method and Description |
---|---|
CurrencyUnit |
getBaseCurrency()
Gets the first currency at fault.
|
ConversionContext |
getConversionContext()
Gets the queried timestamp at fault.
|
CurrencyUnit |
getTermCurrency()
Gets the second currency at fault.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext, 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.conversionContext
- the ConversionContext
in place.message
- the detail message.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.conversionContext
- the ConversionContext
in place.public CurrencyConversionException(CurrencyUnit base, CurrencyUnit term, ConversionContext conversionContext, String message, Throwable cause)
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.)conversionContext
- the ConversionContext
in place.public CurrencyUnit getBaseCurrency()
public CurrencyUnit getTermCurrency()
public ConversionContext getConversionContext()
null
.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.