|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException java.lang.IllegalArgumentException org.joda.money.CurrencyMismatchException
public class CurrencyMismatchException
Exception thrown when a monetary operation fails due to mismatched currencies.
For example, this exception would be thrown when trying to add a monetary value in one currency to a monetary value in a different currency.
This exception makes no guarantees about immutability or thread-safety.
Constructor Summary | |
---|---|
CurrencyMismatchException(CurrencyUnit firstCurrency,
CurrencyUnit secondCurrency)
Constructor. |
Method Summary | |
---|---|
CurrencyUnit |
getFirstCurrency()
Gets the first currency at fault. |
CurrencyUnit |
getSecondCurrency()
Gets the second currency at fault. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CurrencyMismatchException(CurrencyUnit firstCurrency, CurrencyUnit secondCurrency)
firstCurrency
- the first currency, may be nullsecondCurrency
- the second currency, not nullMethod Detail |
---|
public CurrencyUnit getFirstCurrency()
public CurrencyUnit getSecondCurrency()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |