Signals to the outside that the parse has failed. Use this in
 conjunction with .format for nice error messages.
327772
def raise(exception_klass=Parslet::ParseFailed)
      exception = exception_klass.new(self.to_s, self)
      Kernel.raise exception
    end
589741
public void error(Throwable error, String format, Object... extra) {
    if (shouldLog(INFO)) {
      Log.e(tag, String.format(format, extra), error);
    }
  }
107418
function ParseError(msg) {
  this.name = 'ParseError';
  this.message = msg;
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, ParseError);
  }
}
520394
def _fail_with_undefined_error(self, *args, **kwargs):
        
        if self._undefined_hint is None:
            if self._undefined_obj is missing:
                hint = '%r is undefined' % self._undefined_name
            elif not isinstance(self._undefined_name, basestring):
                hint = '%s has no element %r' % (
                    object_type_repr(self._undefined_obj),
                    self._undefined_name
                )
            else:
                hint = '%r has no attribute %r' % (
                    object_type_repr(self._undefined_obj),
                    self._undefined_name
                )
        else:
            hint = self._undefined_hint
        raise self._undefined_exception(hint)
795522
function error (err, file, name, options) {
  var message = err.message
  var column = err.column
  var line = err.line
  var type = err.name
  var method = 'message'

  if (options.throws) {
    method = 'fail'
  }

  file[method](
    message,
    { line: line, column: column },
    'parseFrontMatter:' + name + ':' + type
  )
}
716100
function ParseError(message, position) {
  this.name = 'ParseError';
  this.message = position
    ? message + ' at ' + position.source + ':' + position.start.line + ':' + position.start.column
    : message;
}
396292
function parseError(code, offset) {
    var position = now()

    position.column += offset
    position.offset += offset

    handleWarning.call(warningContext, MESSAGES[code], position, code)
  }
412640
private final void error() throws ParserException {
	Integer currentState = stateStack.peek();
	parserErrors.addError(currentState);
	if (backtrackEnabled && !backtrackStack.isEmpty()) {
	    trackBack();
	    return;
	}
	if (!backtrackEnabled) {
	    logger.trace("No valid action available and back tracking is disabled. Aborting near '"
		    + getTokenStream().getCodeSample(maxPosition) + "'...");
	} else {
	    logger.trace("No valid action available and back tracking stack is empty. Aborting near '"
		    + getTokenStream().getCodeSample(maxPosition) + "'...");
	}
	throw new ParserException(
		"Error! Could not parse the token stream near '" + getTokenStream().getCodeSample(maxPosition) + "'!");
    }
764833
def fail(self, text=u"FAIL", err=False):
        """"""
        # Do not display spin text for fail state
        self._text = None

        _text = text if text else u"FAIL"
        err = err or not self.write_to_stdout
        self._freeze(_text, err=err)
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;
}
309652
def error(self, message):
        
        if (
            "not allowed" in message
            or "ignored" in message
            or "expected" in message
            or "invalid" in message
            or self.add_help
        ):
            # when we have "help" then we must also have proper error
            # processing.  Without "help", we suppress the errors by
            # doing nothing here
            super(IntermediateConfigmanParser, self).error(message)
1156956
function formatter (fail) {
      return fail.map(function oops (err) {
        return {
            line: err.line
          , column: err.character
          , message: err.reason
          , ref: err
        };
      });
    }
1275964
def failure_format_traceback(self, fail):
        
        try:
            f = six.StringIO()
            fail.printTraceback(file=f)
            return f.getvalue()
        except Exception:
            return u"Failed to format failure traceback for '{0}'".format(fail)
976267
function maybeJsdomError(error)
{
        if (jsdomErr)
        {
                error.message += '\nJsdom might fail to load because of this error: ' +
                                 jsdomErr.message +
                                 '\n' +
                                 jsdomErr.stack;
        }

        error.jsdomCause = jsdomErr;

        return error;
}
808812
def error(self, msg):
        """"""

        self._error = True
        self._progress.printMsg('XML parse error: %s' % msg, error=True)
1195380
def parse_error(self, exception=ParseError, *args):
        
        return self._src.parse_error(exception, *args)
95014
public void error(String format, Object... args) throws IOException, ServletException {
        error(String.format(format,args));
    }