public class UnknownCurrencyException extends MonetaryException
CurrencyUnit
.Constructor and Description |
---|
UnknownCurrencyException(java.util.Locale locale)
Creates a new exception instance when a
CurrencyUnit could not be evaluated given a
(country) Locale . |
UnknownCurrencyException(java.lang.String code)
Creates a new exception instance when a
CurrencyUnit could not be evaluated given a
currency code. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrencyCode()
Access the invalid currency code.
|
java.util.Locale |
getLocale()
Access the invalid
Locale . |
java.lang.String |
toString() |
public UnknownCurrencyException(java.util.Locale locale)
CurrencyUnit
could not be evaluated given a
(country) Locale
.locale
- The unknown Locale
, for which a CurrencyUnit
was queried (the
message is constructed automatically), not null.MonetaryCurrencies.getCurrency(Locale)
public UnknownCurrencyException(java.lang.String code)
CurrencyUnit
could not be evaluated given a
currency code.code
- The unknown currency code (the message is constructed automatically), not null.MonetaryCurrencies.getCurrency(String)
public java.lang.String getCurrencyCode()
null
.public java.util.Locale getLocale()
Locale
.Locale
, or null
.public java.lang.String toString()
toString
in class java.lang.Throwable