Package org.apache.druid.utils
Class Throwables
java.lang.Object
org.apache.druid.utils.Throwables
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Throwable>
TgetCauseOfType(Throwable t, Class<T> searchFor) searches for a throwable in the cause chain that is of same type as .
-
Method Details
-
getCauseOfType
searches for a throwable in the cause chain that is of same type as . The class of returned throwable will either be same as or a sub-class of .- Parameters:
t- - the throwable in which to searchsearchFor- - Class of throwable to search for- Returns:
- null if not found otherwise the cause exception that is of same type as searchFor
-