com.ibm.websphere.ras
Class TruncatableThrowable
- java.lang.Object
java.lang.Throwable
com.ibm.websphere.ras.TruncatableThrowable
All implemented interfaces:
java.io.Serializable
- public class TruncatableThrowable
- extends java.lang.Throwable
getWrappedException()
and then call Throwable.printStackTrace()
on the returned exception.
See Also:
Field Summary
Modifier and Type | Field and Description |
---|---|
|
CAUSED_BY
|
|
INTERNAL_CLASSES_STRING
|
Constructor Summary
Constructor and Description |
---|
TruncatableThrowable(java.lang.Throwable wrapped)
|
Method Summary
Modifier and Type | Method and Description |
---|---|
getCause()
|
|
|
getMessage()
|
|
getStackTrace()
|
|
getStackTraceEliminatingDuplicateFrames()
Useful for exceptions which are the causes of other exceptions.
|
|
getWrappedException()
|
|
printStackTrace(java.io.PrintStream stream)
|
|
printStackTrace(java.io.PrintWriter p)
This method will print a trimmed stack trace to stderr.
|
|
printStackTraceElement(java.lang.StackTraceElement stackTraceElement)
Unfortunately, toString() isn't good enough since we may have elements in the stack representing
internal classes, and they don't toString() well.
|
|
toString()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, initCause, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail
CAUSED_BY
- public static final java.lang.String CAUSED_BY
See Also:
INTERNAL_CLASSES_STRING
- public static final java.lang.String INTERNAL_CLASSES_STRING
See Also:
Constructor Detail
TruncatableThrowable
- public TruncatableThrowable(java.lang.Throwable wrapped)
Method Detail
printStackTrace
- public void printStackTrace(java.io.PrintStream stream)
Overrides:
printStackTrace
in class java.lang.Throwable
printStackTrace
- public void printStackTrace(java.io.PrintWriter p)
This method will print a trimmed stack trace to stderr.
Overrides:
printStackTrace
in class java.lang.Throwable
getCause
- public TruncatableThrowable getCause( )
Overrides:
getCause
in class java.lang.Throwable
getStackTrace
- public java.lang.StackTraceElement[] getStackTrace( )
Overrides:
getStackTrace
in class java.lang.Throwable
getStackTraceEliminatingDuplicateFrames
- public java.lang.StackTraceElement[] getStackTraceEliminatingDuplicateFrames( )
Useful for exceptions which are the causes of other exceptions. Gets the stack frames, but not only
does it eliminate internal classes, it eliminates frames which are redundant with the parent
exception.
In the case where the exception is not a cause, it returns a normal exception.
If duplicate frames are stripped, it will add an
Returns:
getWrappedException
- public java.lang.Throwable getWrappedException( )
Returns:
getMessage
- public java.lang.String getMessage( )
Overrides:
getMessage
in class java.lang.Throwable
printStackTraceElement
- public static java.lang.String printStackTraceElement( java.lang.StackTraceElement stackTraceElement)
Unfortunately, toString() isn't good enough since we may have elements in the stack representing
internal classes, and they don't toString() well.
toString
- public java.lang.String toString( )
Overrides:
toString
in class java.lang.Throwable