code: @GwtIncompatible("incompatible method")
    public static boolean isCompatibleWithThrowsClause(final Throwable ex,
        @Nullable final Class<?>... declaredExceptions) {
      if (!ObjectUtils.isCheckedException(ex)) {
        return true;
      }
      if (declaredExceptions != null) {
        for (final Class<?> declaredException : declaredExceptions) {
          if (declaredException.isInstance(ex)) {
            return true;
          }
        }
      }
      return false;
    }
docs: Check whether the given exception is compatible with the specified exception types, as declared
  in a throws clause.
  
  @param ex the exception to check
  @param declaredExceptions the exception types declared in the throws clause
  @return whether the given exception is compatible