Helper function for creating an error when an unexpected lexed token
    is encountered.
558903
def unexpected(parser, at_token=None):
    # type: (Parser, Optional[Any]) -> GraphQLSyntaxError
    """"""
    token = at_token or parser.token
    return GraphQLSyntaxError(
        parser.source, token.start, u"Unexpected {}".format(get_token_desc(token))
    )
1307669
def _expect_token(lexer, types):
    """"""
    tok = next(lexer)
    if any(isinstance(tok, t) for t in types):
        return tok
    else:
        raise Error("unexpected token: " + str(tok))
76883
def error(msg, details=None, *args, **kwargs):
    ''''''
    msg = '{0} {1}'.format(red(KO), white(msg))
    if details:
        msg = '\n'.join((msg, safe_unicode(details)))
    echo(format_multiline(msg), *args, **kwargs)
1174704
async function handleError(error) {
    process.stderr.write('\n' + chalk.red.bold(error + '\n\n'));
    await help(args);
    return 1;
}
1060215
def error_lineno(self):
        """"""
        if isinstance(self.docstring, Docstring):
            return self.docstring.start
        return self.start
687898
def _error_check(err, prefix=""):
    """"""
    if err != 0:
        err_str = _snd.sf_error_number(err)
        raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
864594
function createCombinedError(
  errors: $ReadOnlyArray<UserError>,
  maybePrefix?: ?string,
): CombinedUserError {
  const prefix = maybePrefix != null ? `${maybePrefix}: ` : '';
  return new Error(
    `${prefix}Encountered ${errors.length} error(s):\n` +
      errors
        .map(error =>
          String(error)
            .split('\n')
            .map((line, index) => (index === 0 ? `- ${line}` : `  ${line}`))
            .join('\n'),
        )
        .join('\n'),
  );
}
27774
def error(*tokens: Token, **kwargs: Any) -> None:
    
    tokens = [bold, red, "Error:"] + list(tokens)  # type: ignore
    kwargs["fileobj"] = sys.stderr
    message(*tokens, **kwargs)
601588
def _surpress_formatting_errors(fn):
    
    @wraps(fn)
    def inner(*args, **kwargs):
        try:
            return fn(*args, **kwargs)
        except ValueError:
            return ""
    return inner
1092167
def error(text):
    ''''''
    print(red('✘ {0}'.format(text)))
    sys.stdout.flush()
876137
def translate_syntax_error(error, source=None):
    """"""
    error.source = source
    error.translated = True
    exc_info = (error.__class__, error, None)
    filename = error.filename
    if filename is None:
        filename = '<unknown>'
    return fake_exc_info(exc_info, filename, error.lineno)
561181
function logError(e) {
  var msg = typeof e === 'string' ? e : e.message;

  // esprima.parse errors are in the format 'Line 123: Unexpected token &'
  // we support both formats since users might replace the parser
  if ((/Line \d+:/).test(msg)) {
    // convert into "Error: <filepath>:<line> <error_message>"
    msg = 'Error: ' + msg.replace(/[^\d]+(\d+): (.+)/, e.file + ':$1 $2');
  } else {
    // babylon.parse errors are in the format 'Unexpected token (0:4)'
    var m = (/^([^\(]+)\s\((\d+):(\d+)\)/).exec(msg);
    if (m) {
      // convert into "Error: <filepath>:<line>:<char> <error_message>"
      msg = 'Error: ' + e.file + ':' + m[2] + ':' + m[3] + ' ' + m[1];
    } else if (msg.indexOf('Error:') < 0) {
      msg = 'Error: ' + (e.file ? e.file + ' ' : '') + msg;
    }
  }

  // set the error flag to true to use an exit code !== 0
  exports.exitCode = 1;

  // we don't call console.error directly to make it possible to mock during
  // unit tests
  exports.stderr.write(msg + '\n');

  if (e.stack) {
    exports.stderr.write(e.stack + '\n');
  }
}
331166
function logError(e) {
		e = e instanceof Error ? e : e ? new Error(e) : null;
		if (e) {
			if (options && util.isRegExp(options.hideTokenRegExp)) {
				e.message = e.message.replace(options.hideTokenRegExp, function(match, prefix, token, suffix) {
					return prefix + '[SECURE]' + suffix;
				});
			}
			errors.unshift(e);
			rbot.log.error(e.stack || e.message);
		}
	}
724514
function lessError(ctx /*, options*/) {
  var message = '';
  var extract = ctx.extract;
  var error   = [];

  if (ctx.stack || !ctx.hasOwnProperty('index')) { return ctx; }

  if (typeof (extract[0]) === 'string') {
    error.push((ctx.line - 1) + ' ' + extract[0]);
  }

  if (extract[1]) {
    error.push(ctx.line + ' ' +
               extract[1].slice(0, ctx.column) +
               extract[1][ctx.column] +
               extract[1].slice(ctx.column + 1));
  }

  if (typeof (extract[2]) === 'string') {
    error.push((ctx.line + 1) + ' ' + extract[2]);
  }

  error   = error.join('\n');
  message = ctx.type + 'Error: ' + ctx.message;

  if (ctx.filename) {
    message += ' in ' + ctx.filename + ':' + ctx.line + ':' + ctx.column;
  }

  return new Error(message + '\n---\n' + error);
}
1328840
function yy_syntax_error($yymajor, $TOKEN)
    {
#line 4 "/var/www/coffeescript-php/grammar.y"
 
  throw new SyntaxError(
    'unexpected '.$this->tokenName($yymajor).' in '.self::$FILE.':'
  . (self::$LINE + 1).'.'
  );
#line 3153 "/var/www/coffeescript-php/grammar.php"
    }
1166815
def handle_option_error(func):
    

    def wrapped(*args):
        try:
            return func(*args)
        except options.RuleOptionError as e:
            raise LintConfigError(ustr(e))

    return wrapped
550911
function formatError(e) {
    if (!e.err) {
        return e.message
    }
    // PluginError
    if (typeof e.err.showStack === 'boolean') {
        return e.err.toString()
    }
    // Normal error
    if (e.err.stack) {
        return e.err.stack
    }
    // Unknown (string, number, etc.)
    return new Error(String(e.err)).stack
}