Package org.openjdk.jmc.common.util
Class ExceptionToolkit
- java.lang.Object
 - 
- org.openjdk.jmc.common.util.ExceptionToolkit
 
 
- 
public class ExceptionToolkit extends Object
Toolkit for working with exceptions. 
- 
- 
Constructor Summary
Constructors Constructor Description ExceptionToolkit() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringtoString(Throwable t)Returns a string with the text fromThrowable.printStackTrace().static StringtoString(Throwable t, int maxFrames)Returns a string with a text equivalent toThrowable.printStackTrace(), but with a limited number of frames. 
 - 
 
- 
- 
Method Detail
- 
toString
public static String toString(Throwable t)
Returns a string with the text fromThrowable.printStackTrace(). The string will end with a line break.- Parameters:
 t-Throwableto get the stack trace from- Returns:
 - a string with the stack trace
 
 
- 
toString
public static String toString(Throwable t, int maxFrames)
Returns a string with a text equivalent toThrowable.printStackTrace(), but with a limited number of frames. The string will end with a line break.- Parameters:
 t-Throwableto 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.- Returns:
 - a string with the stack trace
 
 
 - 
 
 -