java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.base.Throwables |
Utility methods for throwables (errors, exceptions, runtime exceptions).
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | Throwables.ThrowableFormatter |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Throwables() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String |
formatStacktrace(Throwable t)
Generate the standard formatting of a throwable as a multi-line, human-readable stacktrace.
| ||||||||||
static String |
formatStacktraceAlt(Throwable t)
This convenience method uses
Throwables.ThrowableFormatter to format a stacktrace. | ||||||||||
static String |
formatStacktraceShort(Throwable t)
Format a throwable as a one-line, human-readable stacktrace.
| ||||||||||
static Throwable |
getRootCause(Throwable t)
Get the innermost cause of a throwable.
| ||||||||||
static void |
rethrowUnchecked(Throwable t)
Rethrow a throwable if it is a RuntimeException, else wrap it in a
RuntimeException and throw.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Generate the standard formatting of a throwable as a multi-line, human-readable stacktrace.
This convenience method uses Throwables.ThrowableFormatter
to format a stacktrace. Suppressed
exceptions are not printed out. Exception tokens are safely escaped.
Format a throwable as a one-line, human-readable stacktrace.
Get the innermost cause of a throwable.
Rethrow a throwable if it is a RuntimeException, else wrap it in a RuntimeException and throw.