public final class ThrowableUtils
extends Object
Throwables.| Modifier and Type | Method and Description |
|---|---|
static Throwable |
addSuppressed(Throwable original,
Throwable suppressed)
Adds suppressed exception avoiding self-suppression.
|
static Throwable |
combine(Object first,
Object second)
Combine two potential
Throwables into one. |
static <T> T |
throwException(Throwable t)
Raises an exception bypassing compiler checks for checked exceptions.
|
public static <T> T throwException(Throwable t)
T - The expected typet - The Throwable to throw.@Nullable
public static Throwable combine(@Nullable
Object first,
@Nullable
Object second)
Throwables into one.
If both parameters are Throwable, the second one will be
suppressed by the first one.first - the first argument that can be Throwable.second - the second argument that can be Throwable.Throwable.public static Throwable addSuppressed(Throwable original,
Throwable suppressed)
original - the original Throwablesuppressed - the Throwable to be suppressedThrowable