|
||||||||||
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 com.caplin.keymaster.error.WrappedException
public class WrappedException
This class provides a way of wrapping up all the different exceptions associated with KeyMaster. The class is used to handle many different exceptions that can be thrown as a result of the encryption, signature and token generation process. This type of exception is thrown by KeyMasters internal classes.
Field Summary | |
---|---|
static String |
WRAPPED_MESSAGE
This will contain the reason why the exception that was thrown. |
Constructor Summary | |
---|---|
WrappedException(Exception toWrap)
Call the empty Exception constructor and initalise class varibales. |
|
WrappedException(String message,
Exception toWrap)
Call the Exception constructor using the message parameter and set class varibales. |
Method Summary | |
---|---|
Exception |
getWrappedException()
Gets the Exception that this class was instantiated with. |
void |
printStackTraceDeep()
Calls printStackTraceDeep(PrintWriter) with the
standard system error output stream. |
void |
printStackTraceDeep(PrintStream ps)
Casts the PrintStream into a PrintWriter and then calls
printStackTraceDeep( PrintWriter pw ) belonging to this class. |
void |
printStackTraceDeep(PrintWriter pw)
Calls the super method Throwable.printStackTrace(java.io.PrintWriter) to
do a stack trace
and then calls the same method belonging to the Exception this class was instantiated with. |
String |
toStringDeep()
Get a detailed description of what has gone wrong and why this class has been instantiated. |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String WRAPPED_MESSAGE
This will contain the reason why the exception that was thrown. The mesasge will start with Wrapped exception:
Constructor Detail |
---|
public WrappedException(String message, Exception toWrap)
Call the Exception
constructor using the message parameter and set class varibales.
message
- the reason why this execption is being created.toWrap
- an exception which was thrown by code in the calling class.public WrappedException(Exception toWrap)
Call the empty Exception
constructor and initalise class varibales.
toWrap
- an exception which was thrown by code in the calling class.Method Detail |
---|
public String toStringDeep()
Get a detailed description of what has gone wrong and why this class has been instantiated.
WRAPPED_MESSAGE
followed by
the Exception passed to the constructor.public void printStackTraceDeep()
Calls printStackTraceDeep(PrintWriter)
with the
standard system error output stream.
public void printStackTraceDeep(PrintWriter pw)
Calls the super method Throwable.printStackTrace(java.io.PrintWriter)
to
do a stack trace
and then calls the same method belonging to the Exception this class was instantiated with.
pw
- Any valid PrintWriter
that corresponds to an output streampublic void printStackTraceDeep(PrintStream ps)
Casts the PrintStream
into a PrintWriter
and then calls
printStackTraceDeep( PrintWriter pw ) belonging to this class.
ps
- Any valid PrintStream
that corresponds to an output stream.public Exception getWrappedException()
Gets the Exception
that this class was instantiated with.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |