public <T extends Exception> ExceptionHandler throwIfInstance(Class<T> t) throws T {
    if (t.isInstance(e)) {
      throw t.cast(e);
    }
    return this;
  }
Throws if the input exception is the instance of the input class
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ExceptionHandler.java