code: private int getMatchedDepth(String exceptionType, Class<?> exceptionClass, int depth) {
          if (exceptionClass.getName().equals(exceptionType)) {
              return depth;
          }
          if (exceptionClass.equals(Throwable.class)) {
              return -1;
          }
          return getMatchedDepth(exceptionType, exceptionClass.getSuperclass(), depth + 1);
      }
docs: Returns the matched depth.
  
  @param exceptionType the exception type
  @param exceptionClass the exception class
  @param depth the depth
  @return the matched depth