|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.log.format.ExceptionUtil
This class provides basic facilities for manipulating exceptions. Some exception handling stuff thieved from Turbine...
| Field Summary | |
private static java.lang.Class |
CASCADING_INTERFACE |
private static java.lang.String |
GET_CAUSE_NAME |
private static java.lang.Class[] |
GET_CAUSE_PARAMTYPES |
private static java.lang.String |
LINE_SEPARATOR |
| Constructor Summary | |
private |
ExceptionUtil()Private constructor to prevent instantiation. |
| Method Summary | |
static java.lang.String[] |
captureStackTrace(java.lang.Throwable throwable)Captures the stack trace associated with this exception. |
static java.lang.Throwable |
getCause(java.lang.Throwable throwable, boolean useReflection)Utility method to get cause of exception. |
static java.lang.String |
printStackTrace(java.lang.Throwable throwable)Generate string for specified exception and the cause of this exception (if any). |
static java.lang.String |
printStackTrace(java.lang.Throwable throwable, boolean printCascading)Generate string for specified exception and if printCascading is true will print all cascading exceptions. |
static java.lang.String |
printStackTrace(java.lang.Throwable throwable, int depth)Serialize the specified Throwable to a string. |
static java.lang.String |
printStackTrace(java.lang.Throwable throwable, int depth, boolean printCascading)Generate exception string for specified exception to specified depth and all Cascading exceptions if printCascading is true. |
static java.lang.String |
printStackTrace(java.lang.Throwable throwable, int depth, boolean printCascading, boolean useReflection)Generate exception string for specified exception to specified depth and all Cascading exceptions if printCascading is true. |
static java.lang.String[] |
splitString(java.lang.String string, java.lang.String onToken)Deprecated. This is an internal utility method that should not be used |
private static java.lang.String[] |
splitStringInternal(java.lang.String string, java.lang.String onToken)Splits the string on every token into an array of stack frames. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String LINE_SEPARATOR
private static final java.lang.String GET_CAUSE_NAME
private static final java.lang.Class[] GET_CAUSE_PARAMTYPES
private static final java.lang.Class CASCADING_INTERFACE
| Constructor Detail |
private ExceptionUtil()
| Method Detail |
public static java.lang.String printStackTrace(java.lang.Throwable throwable)
throwable - a ThrowableString
public static java.lang.String printStackTrace(java.lang.Throwable throwable,
boolean printCascading)
throwable - a ThrowableprintCascading - if true will print all cascading exceptionsString
public static java.lang.String printStackTrace(java.lang.Throwable throwable,
int depth)
Throwable to a string. Restrict the number of frames printed out to the specified depth. If the depth specified is 0 then all the frames are converted into a string.
throwable - a Throwabledepth - number of stack trace frames to showString
public static java.lang.String printStackTrace(java.lang.Throwable throwable,
int depth,
boolean printCascading)
throwable - a Throwabledepth - number of stack trace frames to showprintCascading - if true will print all cascading exceptionsString
public static java.lang.String printStackTrace(java.lang.Throwable throwable,
int depth,
boolean printCascading,
boolean useReflection)
Throwable getCause(). This makes it compatible with JDK1.4 mechanisms for nesting exceptions.
throwable - a Throwabledepth - number of stack trace frames to showprintCascading - if true will print all cascading exceptionsuseReflection - if true will use reflection to handle JDK1.4 nested exceptionsString
public static java.lang.Throwable getCause(java.lang.Throwable throwable,
boolean useReflection)
throwable - a ThrowableuseReflection - if true will use reflection to handle JDK1.4 nested exceptionspublic static java.lang.String[] captureStackTrace(java.lang.Throwable throwable)
throwable - a Throwable
public static java.lang.String[] splitString(java.lang.String string,
java.lang.String onToken)
string - the string to splitonToken - the token to split on
private static java.lang.String[] splitStringInternal(java.lang.String string,
java.lang.String onToken)
string - the string to splitonToken - the token to split on
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||