public abstract class WrapperException extends Exception
catch
block for
their nested exception.Modifier | Constructor and Description |
---|---|
protected |
WrapperException(String m)
Create a wrapper exception with the given message.
|
protected |
WrapperException(String m,
Throwable t)
Create a wrapper exception with the given message and nested
exception.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Retrieve the exception message text.
|
Throwable |
getNested()
Reads the exception wrapped by this object.
|
void |
printStackTrace(PrintWriter pw)
Prints the stack trace of this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace, toString
private Throwable nested
protected WrapperException(String m, Throwable t)
m
- The exception message text.t
- The nested exception that caused this one.protected WrapperException(String m)
m
- The exception message text.public String getMessage()
getMessage
in class Throwable
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable
public Throwable getNested()
Throwable
object that is the exception
that was originally thrown.