|
|||||||||
| 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
jodd.exception.UncheckedException
public class UncheckedException
Unchecked exception and also a wrapper for checked exceptions.
| Field Summary | |
|---|---|
protected java.lang.Throwable |
cause
|
protected static java.lang.String |
CAUSE_DIV
Divider between causes printouts. |
protected boolean |
showCauseDetails
If set to true stack trace will be enhanced with cause's stack traces. |
| Constructor Summary | |
|---|---|
UncheckedException()
|
|
UncheckedException(java.lang.String message)
|
|
UncheckedException(java.lang.String message,
java.lang.Throwable t)
|
|
UncheckedException(java.lang.String message,
java.lang.Throwable t,
boolean showCauseDetails)
|
|
UncheckedException(java.lang.Throwable t)
|
|
UncheckedException(java.lang.Throwable t,
boolean showCauseDetails)
|
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getCause()
Returns exception cause. |
java.lang.String |
getMessage()
Returns the detail message, including the message from the nested exception if there is one. |
void |
printStackTrace()
|
void |
printStackTrace(java.io.PrintStream ps)
|
void |
printStackTrace(java.io.PrintWriter pw)
|
void |
rethrow()
Re-throws cause if exists. |
static java.lang.RuntimeException |
wrap(java.lang.Throwable t)
Wraps all exceptions in a UncheckedException |
static java.lang.RuntimeException |
wrap(java.lang.Throwable t,
java.lang.String message)
Wraps all exceptions in a UncheckedException |
static java.lang.RuntimeException |
wrapChecked(java.lang.Throwable t)
Wraps checked exceptions in a UncheckedException. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.Throwable cause
protected static final java.lang.String CAUSE_DIV
protected final boolean showCauseDetails
true stack trace will be enhanced with cause's stack traces.
| Constructor Detail |
|---|
public UncheckedException(java.lang.Throwable t)
public UncheckedException(java.lang.Throwable t,
boolean showCauseDetails)
public UncheckedException()
public UncheckedException(java.lang.String message)
public UncheckedException(java.lang.String message,
java.lang.Throwable t)
public UncheckedException(java.lang.String message,
java.lang.Throwable t,
boolean showCauseDetails)
| Method Detail |
|---|
public void printStackTrace()
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintStream ps)
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintWriter pw)
printStackTrace in class java.lang.Throwablepublic java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic static java.lang.RuntimeException wrapChecked(java.lang.Throwable t)
UncheckedException.
Unchecked exceptions are not wrapped.
public static java.lang.RuntimeException wrap(java.lang.Throwable t)
UncheckedException
public static java.lang.RuntimeException wrap(java.lang.Throwable t,
java.lang.String message)
UncheckedException
public void rethrow()
throws java.lang.Throwable
java.lang.Throwablepublic java.lang.Throwable getCause()
getCause in class java.lang.Throwable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||