code: protected int indexOfSupported(DateTimeFieldType type) {
          int index = indexOf(type);
          if (index == -1) {
              throw new IllegalArgumentException("Field '" + type + "' is not supported");
          }
          return index;
      }
docs: Gets the index of the specified field, throwing an exception if the
  field is unsupported.
  
  @param type  the type to check, not null
  @return the index of the field
  @throws IllegalArgumentException if the field is null or not supported