Add's error to the errors object;
330552
function buildError(k, message) {
    if (!Array.isArray(errors[k])) errors[k] = [];
    errors[k].push(message);
  }
221480
def add_error(attribute, message)
    @errors[attribute] ||= []
    @errors[attribute] = @errors[attribute] << message unless @errors[attribute].include? message
    @errors
  end
62867
function error (message, error) {
    // build custom error message
    message = `${this.model.name}#${this.id} record error` + (
        typeof message === 'string'
            ? `: ${message}`
            : ''
    )
    // use error object passed in
    if (defined(error)) {
        // create data object with original message
        error.data = {
            message: error.message,
        }
    }
    // create new error message
    else {
        error = new Error(message)
        error.data = {}
    }
    // set record data for error
    error.data.record = this

    return error
}
1190177
protected void addCommitError(Exception error) {

        if (m_commitErrors == null) {
            m_commitErrors = new ArrayList<Throwable>();
        }
        m_commitErrors.add(error);
    }
1270344
def add_errors(self, *errors: Union[BaseSchemaError, SchemaErrorCollection]) -> None:
        
        for error in errors:
            self._error_cache.add(error)
142433
def _add_error(self, *args, **kwargs):  # type: () -> None
        
        if kwargs.get('node', None):
            # if node specified and not none
            error = ConfigError.create_from_yaml_node(
                *args,
                **kwargs
            )
        elif self._value_node:
            # default to using the node if we have one
            error = ConfigError.create_from_yaml_node(
                node=self._value_node,
                *args,
                **kwargs
            )
        else:
            # no nodes or error_obj to attach
            error = ConfigError(*args, **kwargs)

        self._errors.append(error)
590871
public function addErrors(ErrorResourceInterface ...$errors): void
    {
        $this->errors = array_merge($this->errors, $errors);
    }
624785
def add_prefix(self, errors, prefix):
        """"""
        if not prefix:
            prefix = self.get_prefix()
        if prefix:
            return {"%s-%s" % (prefix, k): v for k, v in errors.items()}
        return errors
970718
public void addError(AbstractPageError ape)
    {
        assert (ape != null);

        // if this is not the error reporter, then find an error reporter above this one.
        if (_containerErrors == null && _errors == null) {
            Tag par = getParent();
            while (par != null) {
                if (par instanceof org.apache.beehive.netui.tags.IErrorReporter) {
                    _containerErrors = (org.apache.beehive.netui.tags.IErrorReporter) par;
                    break;
                }
                par = par.getParent();
            }
        }

        // if there is an error reporter, add the error and return
        if (_containerErrors != null) {
            _containerErrors.addError(ape);
            return;
        }

        // This is the error reporter.
        if (_errors == null) {
            _errors = new ArrayList();
        }

        // add the error and update it
        _errors.add(ape);
        ape.errorNo = _errors.size();
    }
760536
def _add_error(self, message):
        """"""
        error_line = Result(False, None, message, Directive(""))
        self._suite.addTest(Adapter(self._filename, error_line))
565575
def add_error_handlers(app):
    """"""

    def handle_validation_error(error):
        response = jsonify({'message': str(error)})
        response.status_code = error.status_code
        return response

    app.errorhandler(ValidationError)(handle_validation_error)
541290
def add_error(e)
      @data[:error] = true

      if @data.key?(:ec)
        @data[:ec] = @data[:ec] + 1
      else
        @data[:ec] = 1
      end

      # If a valid exception has been passed in, log the information about it
      # In case of just logging an error for things such as HTTP client 5xx
      # responses, an exception/backtrace may not exist.
      if e
        if e.backtrace.is_a?(Array)
          add_stack(stack: e.backtrace)
        end

        if HTTP_SPANS.include?(@data[:n])
          set_tags(:http => { :error => "#{e.class}: #{e.message}" })
        else
          log(:error, Time.now, { :message => e.message, :parameters => e.class.to_s })
        end
        e.instance_variable_set(:@instana_logged, true)
      end
      self
    end
1094119
def add_error(self, txt):
        
        self.configuration_errors.append(txt)
        self.conf_is_correct = False
719577
def error(self, request, message, extra_tags='', fail_silently=False):
        """"""
        add(self.target_name, request, constants.ERROR, message, extra_tags=extra_tags,
            fail_silently=fail_silently)
254357
def add_error(self, error, critical=False):
    
    self.errors.append((error, critical))
302150
protected function addError($error){

        $this->valid = false;

        if($error instanceof Exception){
            $this->errors[] = array(
                'file' => $error->getFile(),
                'line' => $error->getLine(),
                'message' => "[".get_class($error)."] ".$error->getMessage()
            );
        }elseif($error instanceof LibXMLError){
            $this->errors[] = array(
                'file' => $error->file,
                'line' => $error->line,
                'message' => "[".get_class($error)."] ".$error->message
            );
        }elseif(is_string($error)){
            $this->errors[] = array(
                'message' => $error
            );
        }
    }
1223149
def add_error(self, value, **kwargs):
        """"""
        kwargs.update({ERROR.VALUE: value})
        self._add_cat_dict(Error, self._KEYS.ERRORS, **kwargs)
        return