|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sape.carbon.core.exception.ExceptionUtility
A utility for printing out and dealing with exceptions in a useful way.
This utility supports the getCause
method of the
Exception
class under JDK 1.4, but uses reflective invocation
to be backwards compatible with JDK 1.3.
Field Summary | |
private static Class[] |
GET_CAUSE_PARAMS
The parameters to the getCause method |
Constructor Summary | |
ExceptionUtility()
|
Method Summary | |
static String |
captureStackTrace(Throwable throwable)
Returns the stack trace information in the form of a string. |
static Throwable |
getNestedException(Throwable throwable)
Gets the nested or causal exception for the supplied throwable. |
static String |
printStackTracesToString(Throwable throwable)
This method returns a string of the stack trace of an exception as well as the stack traces for all causal or previous exceptions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Class[] GET_CAUSE_PARAMS
Constructor Detail |
public ExceptionUtility()
Method Detail |
public static String printStackTracesToString(Throwable throwable)
throwable
- the exception for which the trace should be returned
public static String captureStackTrace(Throwable throwable)
throwable
- the throwable for which the trace should be captured
public static Throwable getNestedException(Throwable throwable)
getCause
method of the JDK 1.4's Exception class. This is
done via reflection to maintain backwards compatibility with JDK 1.3.
throwable
- the throwable for which the nested exception should
be retrieved
null
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |