public class UncheckedException
extends java.lang.RuntimeException
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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 . |
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.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)
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
Copyright © 2003-2013 Jodd Team