Package com.ibm.websphere.ras
Class TruncatableThrowable
java.lang.Object
java.lang.Throwable
com.ibm.websphere.ras.TruncatableThrowable
- All Implemented Interfaces:
- Serializable
An exception which can produce trimmed stack traces. If passed as a parameter to the logger, it will output the
 trimmed stack traces to the console, and the full stack traces to messages.log and trace.log.
 To get full stack traces, call 
getWrappedException() and then call Throwable.printStackTrace() on the returned exception.- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetCause()Useful for exceptions which are the causes of other exceptions.voidprintStackTrace(PrintStream stream) voidThis method will print a trimmed stack trace to stderr.static StringprintStackTraceElement(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.ThrowableaddSuppressed, fillInStackTrace, getLocalizedMessage, getSuppressed, initCause, printStackTrace, setStackTrace
- 
Field Details- 
CAUSED_BY- See Also:
 
- 
INTERNAL_CLASSES_STRING- See Also:
 
 
- 
- 
Constructor Details- 
TruncatableThrowable
 
- 
- 
Method Details- 
printStackTrace- Overrides:
- printStackTracein class- Throwable
 
- 
printStackTraceThis method will print a trimmed stack trace to stderr.- Overrides:
- printStackTracein class- Throwable
 
- 
getCause
- 
getStackTrace- Overrides:
- getStackTracein class- Throwable
 
- 
getStackTraceEliminatingDuplicateFramesUseful 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- Returns:
 
- 
getMessage- Overrides:
- getMessagein class- Throwable
 
- 
printStackTraceElementUnfortunately, toString() isn't good enough since we may have elements in the stack representing internal classes, and they don't toString() well.
- 
toString
 
-