Add an error for the given property.
179507
def add_error(self, property_name, message):
    """"""
    if property_name not in self.errors:
      self.errors[property_name] = []
    self.errors[property_name].append(message)
1274974
public FessMessages addErrorsFailedToDownloadProtwordsFile(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_failed_to_download_protwords_file));
        return this;
    }
1353608
public FessMessages addErrorsBlankPassword(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_blank_password));
        return this;
    }
782791
def error(self, instance, value, error_class=None, extra=''):
        """"""
        error_class = error_class or ValidationError
        if not isinstance(value, (list, tuple, np.ndarray)):
            super(Array, self).error(instance, value, error_class, extra)
        if isinstance(value, (list, tuple)):
            val_description = 'A {typ} of length {len}'.format(
                typ=value.__class__.__name__,
                len=len(value)
            )
        else:
            val_description = 'An array of shape {shp} and dtype {typ}'.format(
                shp=value.shape,
                typ=value.dtype
            )

        if instance is None:
            prefix = '{} property'.format(self.__class__.__name__)
        else:
            prefix = "The '{name}' property of a {cls} instance".format(
                name=self.name,
                cls=instance.__class__.__name__,
            )
        message = (
            '{prefix} must be {info}. {desc} was specified. {extra}'.format(
                prefix=prefix,
                info=self.info,
                desc=val_description,
                extra=extra,
            )
        )
        if issubclass(error_class, ValidationError):
            raise error_class(message, 'invalid', self.name, instance)
        raise error_class(message)
218925
public FessMessages addErrorsCouldNotDeleteLoggedInUser(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_could_not_delete_logged_in_user));
        return this;
    }
66018
public FessMessages addErrorsDesignJspFileDoesNotExist(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_design_jsp_file_does_not_exist));
        return this;
    }
947543
function setFieldError (error) {
    // set path properties for error
    this.setErrorPath(error)
    // get field from error path and missing property name
    var field = this.getErrorField(error)
    // get error message based on error and custom messages on model
    var message = this.getErrorMessage(error)
    // if field is found and not hidden then add error to field
    if (field && !field.hidden) {
        // clear value from field - setting to default or undefined
        field.value = field.default
        // set error message on field
        field.error = message
    }
    // if not specific field set general error on field
    else {
        this.errors.push(message)
    }
}
1036709
public FessMessages addErrorsInvalidConfirmPassword(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_invalid_confirm_password));
        return this;
    }
640521
public void addError(String error) {
    ActionMessages messages = (ActionMessages) next.get(Flash.MESSAGES);
    if (null == messages) {
      messages = new ActionMessages();
      put(Flash.MESSAGES, messages);
    }
    messages.getErrors().add(error);
  }
416920
def add_error(expected_value, target_value)
      @errors[target_value.error_key] = <<-MSG

        Mismatch in field: '#{target_value.error_key}'
          expected: '#{expected_value.value}'
          received: '#{target_value.value}'

      MSG
    end
1275249
def add_codes(err_cls):
    """"""
    class ErrorsWithCodes(object):
        def __getattribute__(self, code):
            msg = getattr(err_cls, code)
            return '[{code}] {msg}'.format(code=code, msg=msg)
    return ErrorsWithCodes()
1362038
public FessMessages addErrorsDesignFileIsUnsupportedType(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_design_file_is_unsupported_type));
        return this;
    }
894095
def add_error(name=None, code=None, status=None):
    """"""
    if not name or not status or not code:
        raise Exception("Can't create Exception class %s: you must set both name, status and code" % name)
    myexception = type(name, (PyMacaronException, ), {"code": code, "status": status})
    globals()[name] = myexception
    if code in code_to_class:
        raise Exception("ERROR! Exception %s is already defined." % code)
    code_to_class[code] = myexception
    return myexception
95641
public FessMessages addErrorsFailedToUpdateJspFile(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_failed_to_update_jsp_file));
        return this;
    }
47687
private void addError(int code, String key) {

        errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes,
                errorCodes.length + 1);
        errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys,
                errorKeys.length + 1);
        errorCodes[errorCodes.length - 1] = code;
        errorKeys[errorKeys.length - 1]   = key;
    }
967487
protected void addError(String errorKey, String errorMessage) {
		invalid = true;
		controller.setAttr(errorKey, errorMessage);
		if (shortCircuit) {
			throw new ValidateException();
		}
	}
641216
public FessMessages addErrorsCrudFailedToCreateInstance(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_crud_failed_to_create_instance));
        return this;
    }