docs: public static boolean recursiveClassEquals(Throwable throwableToInspect, Class... throwableClassesToLookFor) {
          for (Class clazz: throwableClassesToLookFor) {
              Class classToInspect = throwableToInspect.getClass();
              while (classToInspect != null) {
                  if (classToInspect.equals(clazz)) {
                      return true;
                  }
                  classToInspect = classToInspect.getSuperclass();
              }
          }
          Throwable cause = throwableToInspect.getCause();
          return cause != null && recursiveClassEquals(cause, throwableClassesToLookFor);
      }