Package net.sf.basedb.util.error
Class ThrowableUtil
java.lang.Object
net.sf.basedb.util.error.ThrowableUtil
Utility class for working with
Throwable
:s.- Version:
- 2.9
- Author:
- Nicklas
- Last modified
- $Date: 2014-04-23 14:27:51 +0200 (on, 23 apr 2014) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
stackTraceToImage
(Throwable t, int width, int height) Prints as much of a stacktrace as possible to an image.static String
Convert a stacktrace to a string that is usually printed with theThrowable.printStackTrace()
method.
-
Constructor Details
-
ThrowableUtil
public ThrowableUtil()
-
-
Method Details
-
stackTraceToString
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
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
-