public class ExceptionToolkit
extends java.lang.Object
| Constructor and Description |
|---|
ExceptionToolkit() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
toString(java.lang.Throwable t)
Returns a string with the text from
Throwable.printStackTrace(). |
static java.lang.String |
toString(java.lang.Throwable t,
int maxFrames)
Returns a string with a text equivalent to
Throwable.printStackTrace(), but with a
limited number of frames. |
public static java.lang.String toString(java.lang.Throwable t)
Throwable.printStackTrace(). The string will end
with a line break.t - Throwable to get the stack trace frompublic static java.lang.String toString(java.lang.Throwable t,
int maxFrames)
Throwable.printStackTrace(), but with a
limited number of frames. The string will end with a line break.t - Throwable to get the stack trace frommaxFrames - The max number of frames to include in the string. If there are more frames in the
stack trace, then an ellipsis is added at the end.