Creates a SyntaxError.
505731
def syntax_err(self):
        """"""
        args = self.args[:2] + (None, None) + self.args[4:]
        err = SyntaxError(self.message(*args))
        err.offset = args[2]
        err.lineno = args[3]
        return err
45508
def error(msg, line = nil)
      error = ::Opal::SyntaxError.new(msg)
      error.location = Opal::OpalBacktraceLocation.new(file, line)
      raise error
    end
520057
private VLayout createErrorLayout(ExceptionDto error) {
		VLayout layout = new VLayout();
		layout.setWidth100();
		layout.setHeight100();
		layout.setPadding(WidgetLayout.marginLarge);

		HLayout topLayout = new HLayout(WidgetLayout.marginLarge);
		topLayout.setWidth100();
		Img icon = new Img(WidgetLayout.iconError,
				WidgetLayout.exceptionWindowIconSize, WidgetLayout.exceptionWindowIconSize);
		topLayout.addMember(icon);
		HTMLFlow message = new HTMLFlow();
		message.setWidth100();
		message.setHeight100();
		message.setLayoutAlign(VerticalAlignment.TOP);
		message.setContents(HtmlBuilder.divStyle(WidgetLayout.exceptionWindowMessageStyle, error.getMessage()));
		topLayout.addMember(message);
		layout.addMember(topLayout);

		if (error.getStackTrace() != null && error.getStackTrace().length > 0) {
			expandButton = new Button(MESSAGES.exceptionDetailsView());
			expandButton.setWidth(WidgetLayout.exceptionWindowButtonWidth);
			expandButton.setLayoutAlign(Alignment.RIGHT);
			expandButton.addClickHandler(new ClickHandler() {

				public void onClick(ClickEvent event) {
					setDetailsVisible(!detailsLayout.isVisible());
				}
			});
			layout.addMember(expandButton);

			String content = getDetails(error);
			HTMLPane detailPane = new HTMLPane();
			detailPane.setContents(content);
			detailPane.setWidth100();
			detailPane.setHeight100();
			detailsLayout = new VLayout();
			detailsLayout.setWidth100();
			detailsLayout.setHeight100();
			detailsLayout.addMember(detailPane);
			detailsLayout.setBorder(WidgetLayout.exceptionWindowDetailBorderStyle);
			layout.addMember(detailsLayout);
		}
		return layout;
	}
100851
function WrapperError(message, innerError) {
  // supports instantiating the object without the new keyword
  if (!(this instanceof WrapperError)) {
    return new WrapperError(message, innerError);
  }

  Error.call(this);
  Error.captureStackTrace(this, WrapperError);

  this.message = message;
  this.innerError = innerError;
}
949773
public static void syntaxError(SyntacticItem e, int code, SyntacticItem... context) {
		WyilFile wf = (WyilFile) e.getHeap();
		// Allocate syntax error in the heap));
		SyntacticItem.Marker m = wf.allocate(new WyilFile.SyntaxError(code, e, new Tuple<>(context)));
		// Record marker to ensure it gets written to disk
		wf.getModule().addAttribute(m);
	}
1256298
def report_invalid_syntax(self):
        """"""
        (exc_type, exc) = sys.exc_info()[:2]
        if len(exc.args) > 1:
            offset = exc.args[1]
            if len(offset) > 2:
                offset = offset[1:3]
        else:
            offset = (1, 0)
        self.report_error(offset[0], offset[1] or 0,
                          'E901 %s: %s' % (exc_type.__name__, exc.args[0]),
                          self.report_invalid_syntax)
1115860
function makeDiscordjsError(Base) {
  return class DiscordjsError extends Base {
    constructor(key, ...args) {
      super(message(key, args));
      this[kCode] = key;
      if (Error.captureStackTrace) Error.captureStackTrace(this, DiscordjsError);
    }

    get name() {
      return `${super.name} [${this[kCode]}]`;
    }

    get code() {
      return this[kCode];
    }
  };
}
826620
function makeError(code, message, data = {}) {
  const error = new Error(message);
  return Object.assign(error, {code, data});
}
645606
function error () {
  if (mocking) {
    cli.stderr += stripAnsi(concatArguments(arguments) + '\n')
  } else {
    console.error.apply(null, arguments)
  }
}
725979
function (errors) {
    if (typeof errors === 'string' || errors instanceof Error) {
      errors = {'*': '' + errors};
    }
    else if (errors == null) {
      errors = {'*': 'Unknown error'};
    }
    return new DS.InvalidError(errors);
  }
541535
private String createError(String errorMsg, Throwable t) {

        StringBuffer msg = new StringBuffer();
        msg.append(errorMsg);
        msg.append("\n");
        msg.append(t.getMessage());
        msg.append("\n");
        msg.append(CmsException.getStackTraceAsString(t));

        return createError(msg.toString());
    }
170622
private MalformedJsonException syntaxError(String message)
  {
    String mess = message + " at line " + getLineNumber() + " column " + getColumnNumber();
    logger.log(Level.SEVERE, mess);
    throw new MalformedJsonException(mess);
  }
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
1114270
function createSyntaxError (message, c) {
  if (c === undefined) {
    c = index - token.length;
  }
  let error = new SyntaxError(message + ' (char ' + c + ')');
  error['char'] = c;

  return error;
}
105851
protected void lexError(int pos, String key, Object... args) {
        log.error(pos, key, args);
        tk = TokenKind.ERROR;
        errPos = pos;
    }
769038
def p_error(self, elem):
        ''''''
        self.errors.append("Syntax error on line " + str(self.lexer.lineno)
                           + ". Got unexpected token " + elem.type)
461052
private function constructException()
    {
        $this->details['argument_type_error'][$this->argument] = $this->details['argument_type_error']['ARG'];
        $this->details['argument_type_error'][$this->argument] = str_replace(['VAR_TYPE', 'ARG_TYPE'], [$this->argumentValueType, $this->argumentType], $this->details['argument_type_error'][$this->argument]);
        unset($this->details['argument_type_error']['ARG']);

        $this->resolution = str_replace('ARG_TYPE', $this->argumentType, $this->resolution);
    }