public final class ExceptionUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
getMessages(java.lang.Throwable e)
Gets only exception messages (top-level first, then inner) as an array of strings
|
static java.lang.String |
getMessages(java.lang.Throwable e,
java.lang.String delimiter)
Gets only exception messages (top-level first, then inner) as a string delimited with the specified string.
|
static java.util.List<java.lang.String> |
getTypesAndMessages(java.lang.Throwable e)
Gets all exception types and messages (top-level first, then inner) as an array of strings, e.g.
|
static java.lang.String |
getTypesAndMessages(java.lang.Throwable e,
java.lang.String delimiter)
Gets all exception messages (top-level first, then inner) as a string delimited with the specified string.
|
static void |
tryThrowInner(java.lang.Throwable e)
If the Exception's inner exception is set, throws the inner exception.
|
static void |
unchecked(Actions.Action0 action)
Executes the given block of code using sneaky throws
|
static void |
uncheckedThrow(java.lang.Throwable e)
Throws an exception as unchecked exception
|
public static java.util.List<java.lang.String> getTypesAndMessages(java.lang.Throwable e)
public static java.lang.String getTypesAndMessages(java.lang.Throwable e, java.lang.String delimiter)
public static java.util.List<java.lang.String> getMessages(java.lang.Throwable e)
public static java.lang.String getMessages(java.lang.Throwable e, java.lang.String delimiter)
public static void tryThrowInner(java.lang.Throwable e) throws java.lang.Throwable
java.lang.Throwable
public static void uncheckedThrow(java.lang.Throwable e)
public static void unchecked(Actions.Action0 action)