Class Throwables

java.lang.Object
org.apache.druid.utils.Throwables

public final class Throwables extends Object
  • Method Details

    • getCauseOfType

      @Nullable public static <T extends Throwable> T getCauseOfType(Throwable t, Class<T> searchFor)
      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 search
      searchFor - - Class of throwable to search for
      Returns:
      null if not found otherwise the cause exception that is of same type as searchFor