|
|||||||||
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 jodd.util.UncheckedException
public class UncheckedException
Unchecked exception and also a wrapper for checked exceptions.
Field Summary | |
---|---|
protected java.lang.Throwable |
cause
|
static java.lang.String |
CAUSE_DIV
Divider between causes printouts. |
boolean |
causeDetails
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.Throwable t)
|
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
public static java.lang.String CAUSE_DIV
public boolean causeDetails
true
stack trace will be enhanced with cause's stack traces.
Constructor Detail |
---|
public UncheckedException(java.lang.Throwable t)
public UncheckedException()
public UncheckedException(java.lang.String message)
public UncheckedException(java.lang.String message, java.lang.Throwable t)
Method Detail |
---|
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream ps)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter pw)
printStackTrace
in class java.lang.Throwable
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public 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.Throwable
public 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 |