public final class Exceptions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getStackTrace(java.lang.Throwable exception)
Get an Throwable's stack trace.
|
static void |
ignore(java.lang.Throwable exception)
Ignore an Throwable.
|
static java.lang.RuntimeException |
toRuntime(java.lang.Throwable exception)
Make an Throwable unchecked by wrapping it into a RuntimeException.
|
static java.lang.String |
toString(java.lang.Throwable e)
Determine the best textual representation of an Throwable.
|
static void |
warn(java.lang.Throwable exception)
Warn about an Throwable.
|
public static java.lang.RuntimeException toRuntime(java.lang.Throwable exception)
exception - The Throwable to wrap.public static void ignore(@Nullable java.lang.Throwable exception)
This function logs the Throwable using the trace log level and discards it.
exception - The Throwable to ignore (may be null).public static void warn(@Nullable java.lang.Throwable exception)
This function logs the Throwable using the warning log level and discards it.
exception - The Throwable to warn about (may be null).public static java.lang.String getStackTrace(java.lang.Throwable exception)
exception - The Throwable to get the stack trace for.public static java.lang.String toString(java.lang.Throwable e)
e - The Throwable to get the textual representation for.