public final class ThrowableUtils
extends java.lang.Object
Throwables.| Modifier and Type | Method and Description |
|---|---|
static boolean |
matches(java.lang.Throwable original,
java.lang.Class<? extends java.lang.Throwable> toMatch)
Finds if the passed
original or any of its causes are an instance of toMatch. |
static <T extends java.lang.Throwable> |
unknownStackTrace(T cause,
java.lang.Class<?> clazz,
java.lang.String method)
Set the
StackTraceElement for the given Throwable, using the Class and method name. |
public static <T extends java.lang.Throwable> T unknownStackTrace(T cause,
java.lang.Class<?> clazz,
java.lang.String method)
StackTraceElement for the given Throwable, using the Class and method name.T - The type of Throwable.cause - The cause to initialize.clazz - The class where the cause is thrown from.method - The method where the cause is thrown from.cause after the stack trace has been initialized.public static boolean matches(java.lang.Throwable original,
java.lang.Class<? extends java.lang.Throwable> toMatch)
original or any of its causes are an instance of toMatch.original - Throwable to search.toMatch - Throwable to find in original.true if passed original or any of its causes are an instance of toMatch.