|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.joda.money.format.MoneyFormatException
public class MoneyFormatException
Exception thrown during monetary formatting.
This exception makes no guarantees about immutability or thread-safety.
| Constructor Summary | |
|---|---|
MoneyFormatException(String message)
Constructor taking a message. |
|
MoneyFormatException(String message,
Throwable cause)
Constructor taking a message and cause. |
|
| Method Summary | |
|---|---|
void |
rethrowIOException()
Checks if the cause of this exception was an IOException, and if so re-throws it |
| 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 MoneyFormatException(String message)
message - the message
public MoneyFormatException(String message,
Throwable cause)
message - the messagecause - the exception cause| Method Detail |
|---|
public void rethrowIOException()
throws IOException
This method is useful if you call a printer with an open stream or writer and want to ensure that IOExceptions are not lost.
try {
printer.print(writer, money);
} catch (CalendricalFormatException ex) {
ex.rethrowIOException();
// if code reaches here exception was caused by issues other than IO
}
Note that calling this method will re-throw the original IOException,
causing this MoneyFormatException to be lost.
IOException - if the cause of this exception is an IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||