Manually add an error
434570
public function add($id, $msg) {
        if (isset($this->errors[$id]) && !is_array($this->errors[$id]))
            $this->errors[$id] = array($msg);
        else
            $this->errors[$id][] = $msg;
    }
717563
def add_error(key, kind, message = nil)
      raise ArgumentError.new("Invalid kind") unless kind.is_a?(Symbol)

      @errors ||= ErrorHash.new
      @errors.tap do |errs|
        path = key.to_s.split(".")
        last = path.pop
        inner = path.inject(errs) do |cur_errors,part|
          cur_errors[part.to_sym] ||= ErrorHash.new
        end
        inner[last] = ErrorAtom.new(key, kind, :message => message)
      end
    end
794200
def _make_error(index, code, errmsg, operation):
    
    return {
        _UINDEX: index,
        _UCODE: code,
        _UERRMSG: errmsg,
        _UOP: operation
    }
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)
1360198
def _error(self, message, start, end=None):
        """"""
        raise errors.EfilterParseError(
            source=self.source, start=start, end=end, message=message)
1296194
def setErrorHandler(self,f,arg):
        """"""
        libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
1234839
private function appendError()
    {
        $this->errors[(string) curl_errno($this->ch)] = curl_error($this->ch);
    }
1027972
function makeError(code, text) {
  var err = new Error(text);
  err.code = code;
  return err;
}
1296149
function errorify (res) {
  var cwd = process.cwd()
  var count = res.errorCount + res.warningCount
  var err = new Error('' + count + (count === 1 ? ' issue' : ' issues') + ' found:')
  err.stack = '' + err.message

  res.results.forEach(function (result) {
    result.messages.forEach(function (message) {
      err.stack += ('\n    ' +
        result.filePath.replace(cwd, '').replace(/^\//, '') +
        ':' + message.line + ':' + message.column + ': ' +
        message.message + ' (' + message.ruleId + ')')
    })
  })

  return err
}
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;
    }
1288828
def _add(self, error: "Err"):
        
        if self.trace_errs is True:
            self.errors.append(error)
39287
def add_errors(self, *errors: Union[BaseSchemaError, List[BaseSchemaError]]) -> None:
        
        self.schema_loader.add_errors(*errors)
937951
def err(self, output, newline=True):
        """"""
        click.echo(output, nl=newline, err=True)
1133762
def go_to_error(self, text):
        """"""
        match = get_error_match(to_text_string(text))
        if match:
            fname, lnb = match.groups()
            if ("<ipython-input-" in fname and
                    self.run_cell_filename is not None):
                fname = self.run_cell_filename
            self.edit_goto.emit(osp.abspath(fname), int(lnb), '')
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);
  }
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
1267138
def FMErrorByNum( num ):
    """"""

    if not num in FMErrorNum.keys():
        raise FMServerError, (num, FMErrorNum[-1])
    elif num == 102:
        raise FMFieldError, (num, FMErrorNum[num])
    else:
        raise FMServerError, (num, FMErrorNum[num])