net.sf.basedb.util.error
Class ThrowableUtil
java.lang.Object
net.sf.basedb.util.error.ThrowableUtil
public class ThrowableUtil
- extends Object
Utility class for working with Throwable
:s.
- Version:
- 2.9
- Author:
- Nicklas
- Last modified
- $Date: 2009-10-02 14:29:28 +0200 (Fri, 02 Oct 2009) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrowableUtil
public ThrowableUtil()
stackTraceToString
public static String stackTraceToString(Throwable t)
- Convert a stacktrace to a string that is usually printed
with the
Throwable.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