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 SummaryConstructors Constructor Description ExceptionToolkit()
 - 
Method SummaryAll 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- 
toStringpublic 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
 
 - 
toStringpublic 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 from
- maxFrames- 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
 
 
- 
 
-