public final class Throwables extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Throwable> |
find(Throwable throwable,
Class<T> type)
Return the top-most Throwable in the exception's chain that matches the given type.
|
public static <T extends Throwable> Optional<T> find(Throwable throwable, Class<T> type)
T
- throwable typethrowable
- starting point of the searchtype
- looked up throwable typeCopyright 2011-2017 ForgeRock AS.