Package org.keycloak.common.util
Class Throwables
java.lang.Object
org.keycloak.common.util.Throwables
A utility class for working with
Throwable instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCausedBy(Throwable throwable, Class<? extends Exception>... type) Checks if the giventhrowableor any of its causes (up to a depth of 3) is an instance of any of the specified exception types.
-
Constructor Details
-
Throwables
public Throwables()
-
-
Method Details
-
isCausedBy
@SafeVarargs public static boolean isCausedBy(Throwable throwable, Class<? extends Exception>... type) Checks if the giventhrowableor any of its causes (up to a depth of 3) is an instance of any of the specified exception types.- Parameters:
throwable-type-- Returns:
-