Memorizies a parser error message
11104
def _onError(self, message):
        """"""
        self.isOK = False
        if message.strip() != "":
            self.errors.append(message)
952302
function wrapError(message, cause) {
  var err = new Error(f('%s: %s', message, cause.message));
  err.cause = cause;
  return err;
}
1367408
function parseGoogleNewsRSSParamsErrorHelper(errorMessage) {
    return {error: true
        , errorMessage: errorMessage
        , type: null 
        , terms: null
        , url: null
        };
}
766881
function lexError(message, input, index) {
	let lexMessage = message + "\n\n";

	// Show input characters surrounding the source of the error.
	for (
		let i = Math.max(0, index - 16);
		i < Math.min(index + 16, input.length);
		i++
	) {
		lexMessage += input[i];
	}

	error(lexMessage);
}
685085
function MonkeyLearnError(error_code, response, message, fileName, lineNumber) {
  let instance = new Error(message, fileName, lineNumber);
  instance.error_code = error_code;
  instance.response = response;
  Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
  if (Error.captureStackTrace) {
    Error.captureStackTrace(instance, MonkeyLearnError);
  }
  return instance;
}
1168502
def error(message)
      length = (position > 0 ? Tokenizer.query(symbols[0..(position - 1)]).size + 1 : 0)
      raise "parsing query failed\n#{message}\n\n#{Tokenizer.query(symbols)}\n#{' ' * length}^"
    rescue
      logger.error $!
      raise $!
    end
1346979
function unknownError(message, stack) {
    jitsu.log.error(message);
    stack.split('\n').forEach(function (line) {
      jitsu.log.error(line);
    })
  }
1242941
private String getParserErrorMessage() {
	StringBuffer code = new StringBuffer(text);
	code = code.insert(maxPosition, " >><< ");
	String codeString = code.substring(maxPosition - 100 < 0 ? 0 : maxPosition - 100,
		maxPosition + 100 >= code.length() ? code.length() : maxPosition + 100);
	return "Could not parse the input string near '" + codeString + "'!";
    }
617657
function(code, err, message) {
		code = (code || isNaN(code)) ? code : 500;
		err = (err) ? err : '';
		message = (message) ? message : '';

		return {
			'code': code,
			'error': err,
			'message': message
		};
	}
1296194
def setErrorHandler(self,f,arg):
        """"""
        libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
1023274
function serializeError(err) {
  var o = {};

  Object.getOwnPropertyNames(err).forEach(function (k) {
    o[k] = err[k];
  });

  return _.omit(o, ['stack', 'type', 'arguments']);
}
1238592
function formatError(err, input) {
    var msg = err.message.replace(/\s*\(\d*\:\d*\)\s*$/i, ''); // remove line number / col number

    var bm = ('' + input.slice(0, err.pos)).match(/.*$/i);
    var am = ('' + input.slice(err.pos)).match(/.*/i);
    var before = bm ? bm[0] : '';
    var after = am ? am[0] : '';

    // Prepare line info for txt display
    var cursorPos = before.length;
    var lineStr = before + after;
    var lncursor = [];
    for (var i = 0, sz = lineStr.length; sz > i; i++) {
        lncursor[i] = (i === cursorPos) ? '\u005E' : '-';
    }
    var lineInfoTxt = lineStr + '\n' + lncursor.join('');

    return {
        description: msg,
        lineInfoTxt: lineInfoTxt,
        code: lineStr,
        line: err.loc ? err.loc.line : -1,
        column: err.loc ? err.loc.column : -1
    };
}
176932
def parse_error(lines)
      if lines.size == 1
        case lines.first
          when '# Unknown service' then raise UnknownService
          when '# Bad exit'        then raise BadExit
        end
      end
    end
885948
def handle_token(cls, parser, token):
        
        tag_error = "Accepted formats {%% %(tagname)s %(args)s %%} or " \
                    "{%% %(tagname)s %(args)s as [var] %%}"
        bits = token.split_contents()
        args_count = len(bits) - 1
        if args_count >= 2 and bits[-2] == 'as':
            as_var = bits[-1]
            args_count -= 2
        else:
            as_var = None
        if args_count != cls.args_count:
            arg_list = ' '.join(['[arg]' * cls.args_count])
            raise TemplateSyntaxError(tag_error % {'tagname': bits[0],
                                                   'args': arg_list})
        args = [parser.compile_filter(tkn)
                for tkn in bits[1:args_count + 1]]
        return cls(args, varname=as_var)
1103270
def make_syntax_err(self, err, original):
        """"""
        msg, loc = err.args
        return self.make_err(CoconutSyntaxError, msg, original, loc)
732488
function parseError(error) {
  // If this file is at the root of your project
  var pathRegexp = new RegExp(__dirname, 'g');
  var display = '';
  if (error.code) { display += 'Error code: ' + error.code + '\n\n' };
  if (error.stack) { display += error.stack.replace(pathRegexp, ''); }
  if (!display) { display = error.toString(); }
  return display;
}
838489
def make_parse_err(self, err, reformat=True, include_ln=True):
        """"""
        err_line = err.line
        err_index = err.col - 1
        err_lineno = err.lineno if include_ln else None
        if reformat:
            err_line, err_index = self.reformat(err_line, err_index)
            if err_lineno is not None:
                err_lineno = self.adjust(err_lineno)
        return CoconutParseError(None, err_line, err_index, err_lineno)