# Class: com.pnfsoftware.jeb.util.base.Throwables

Utility methods for throwables \(errors, exceptions, runtime exceptions\).

## Constructor: Throwables


## Static Method: formatStacktrace
- parameter: `t`, type: `java.lang.Throwable`
- return type: `java.lang.String`

Description: Generate the standard formatting of a throwable as a multi\-line, human\-readable stacktrace.
parameter: t: throwable to format
return: formatted stack trace

## Static Method: formatStacktraceAlt
- parameter: `t`, type: `java.lang.Throwable`
- return type: `java.lang.String`

Description: This convenience method uses [ThrowableFormatter](ThrowableFormatter) to format a stacktrace. Suppressed exceptions are not printed out. Exception tokens are safely escaped.
parameter: t: throwable to format
return: formatted stack trace

## Static Method: formatStacktraceShort
- parameter: `t`, type: `java.lang.Throwable`
- return type: `java.lang.String`

Description: Format a throwable as a one\-line, human\-readable stacktrace.
parameter: t: throwable to format
return: formatted stack trace

## Static Method: getRootCause
- parameter: `t`, type: `java.lang.Throwable`
- return type: `java.lang.Throwable`

Description: Get the innermost cause of a throwable.
parameter: t: throwable
return: root cause, or the provided throwable if it has no cause

## Static Method: rethrowUnchecked
- parameter: `t`, type: `java.lang.Throwable`

Description: Rethrow a throwable if it is a [RuntimeException](RuntimeException), else wrap it in a [RuntimeException](RuntimeException) and throw.
parameter: t: throwable to rethrow

