Dialog with title "Error" and provided text.
179320
public static DetailsDialog showErrorDialog (Stage stage, String text) {
		return showErrorDialog(stage, text, (String) null);
	}
769038
def p_error(self, elem):
        ''''''
        self.errors.append("Syntax error on line " + str(self.lexer.lineno)
                           + ". Got unexpected token " + elem.type)
387109
def scanerror(self, msg):
        """"""
        error('scan error: ' + msg + ' on line {}'.format(self.sline))
        sys.exit(-1)
443397
protected void showLightError(String msg) {
    if (getActivity() != null) {
      Toast.makeText(getActivity(), msg, Toast.LENGTH_SHORT).show();
    }
  }
970692
function ErrorMessage({ state, error, clearError }) {
  return (
    <>
      <h1 style={{ color: "red" }}>{error.message}</h1>
      <button onClick={() => clearError()}>Try Again</button>
      <pre>{JSON.stringify(state, null, 2)}</pre>
    </>
  )
}
571156
def error(self, message: str) -> None:
        """"""
        if len(self._custom_error_message) > 0:
            message = self._custom_error_message
            self._custom_error_message = ''

        lines = message.split('\n')
        linum = 0
        formatted_message = ''
        for line in lines:
            if linum == 0:
                formatted_message = 'Error: ' + line
            else:
                formatted_message += '\n       ' + line
            linum += 1

        sys.stderr.write(Fore.LIGHTRED_EX + '{}\n\n'.format(formatted_message) + Fore.RESET)
        # sys.stderr.write('{}\n\n'.format(formatted_message))
        self.print_help()
        sys.exit(1)
1083317
def error(self, msg, indent=0, **kwargs):
        """"""
        return self.logger.error(self._indent(msg, indent), **kwargs)
614179
def _fail(self, message, text, i):
        """"""

        raise ValueError("{}:\n{}".format(message, text[i : i + 79]))
275374
function(error, verbose) {
    var message = "";
 
    //Some errors have a base error (in case of ElevatorError for example)
    while(error) {
        message += (verbose === true && error.stack) ? error.stack : error.message;
        error = error.baseError;
        
        if(error) {
            message += "\r\n";
        } 
    }
    
    return message;
}
1149700
def error(self, message):
        """"""
        sys.stderr.write('error: %s\n\n' % message)
        self.print_help()
        sys.exit(2)
206333
function err(...messages) {
  console.error(...messages);
  const p = document.createElement('p');
  p.innerText = messages.join(' ');
  p.style = 'color: red';
  logElement.appendChild(p);
}
601060
private void displayError(String message, boolean showForgotPassword, boolean showTime) {

        message = message.replace("\n", "<br />");
        if (showForgotPassword) {
            message += "<br /><br /><a href=\""
                + getResetPasswordLink()
                + "\">"
                + CmsVaadinUtils.getMessageText(Messages.GUI_FORGOT_PASSWORD_0)
                + "</a>";
        }
        if (showTime) {
            SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
            message += "<div style=\"position:absolute;right:6px;bottom:5px;\">"
                + CmsVaadinUtils.getMessageText(Messages.GUI_TIME_1, sdf.format(new Date()))
                + "</div>";
        }
        m_ui.showLoginError(message);
    }
71029
def errors_as_text(self):
        
        errors = []
        errors.append(self.non_field_errors().as_text())
        errors_data = self.errors.as_data()
        for key, value in errors_data.items():
            field_label = self.fields[key].label
            err_descn = ''.join([force_text(e.message) for e in value])
            error = "%s %s" % (field_label, err_descn)
            errors.append(error)
        return ','.join(errors)
494615
def show_error(self, *messages):
        """"""
        if not self.quiet:
            self.display(messages, main_sig, debug=True)
87383
def x_parse_error(err, content, source):
    
    lineno, column = err.position
    if "<doc>" in content:
        #Adjust the position since we are taking the <doc> part out of the tags
        #since we may have put that in ourselves.
        column -= 5
    start = lineno - (1 if lineno == 1 else 2)
    lines = []
    tcontent = content.replace("<doc>", "").replace("</doc>", "").split('\n')
    for context in IT.islice(tcontent, start, lineno):
        lines.append(context.strip())
    last = wrap_line(lines.pop(), column)
    lines.extend(last)
    
    caret = '{:=>{}}'.format('^', len(last[-1]))
    if source is not None:
        err.msg = '\nIn: {}\n{}\n{}\n{}'.format(source, err, '\n'.join(lines), caret)
    else:
        err.msg = '{}\n{}\n{}'.format(err, '\n'.join(lines), caret)

    raise err
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
    };
}
1221993
def _headline(self, error, i: int) -> str:
        
        msgs = Msg()
        # get the error title
        if error.errclass == "fatal":
            msg = msgs.fatal(i)
        elif error.errclass == "warning":
            msg = msgs.warning(i)
        elif error.errclass == "info":
            msg = msgs.info(i)
        elif error.errclass == "debug":
            msg = msgs.debug(i)
        elif error.errclass == "via":
            msg = msgs.via(i)
        else:
            msg = msgs.error(i)
        # function name
        if error.function is not None:
            msg += " from " + colors.bold(error.function)
        if error.caller is not None:
            msg += " called from " + colors.bold(error.caller)
        if error.caller_msg is not None:
            msg += "\n" + error.caller_msg
        if error.function is not None and error.msg is not None:
            msg += ": "
        else:
            msg = msg + " "
        if error.errtype is not None:
            msg += error.errtype + " : "
        if error.msg is not None:
            msg += error.msg
        return msg