Package net.sf.basedb.util.error
Class ThrowableUtil
- java.lang.Object
-
- net.sf.basedb.util.error.ThrowableUtil
-
-
Constructor Summary
Constructors Constructor Description ThrowableUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferedImage
stackTraceToImage(Throwable t, int width, int height)
Prints as much of a stacktrace as possible to an image.static String
stackTraceToString(Throwable t)
Convert a stacktrace to a string that is usually printed with theThrowable.printStackTrace()
method.
-
-
-
Method Detail
-
stackTraceToString
public static String stackTraceToString(Throwable t)
Convert a stacktrace to a string that is usually printed with theThrowable.printStackTrace()
method.- Parameters:
t
- The throwable- Returns:
- The string representation of the stack trace
-
stackTraceToImage
public static BufferedImage stackTraceToImage(Throwable t, int width, int height)
Prints as much of a stacktrace as possible to an image.- Parameters:
t
- The throwablewidth
- The width of the imageheight
- The height of the image- Since:
- 2.14
-
-