Opens an error dialog if necessary. Takes care of complex rules necessary
for making the error dialog look nice.
357872
private void openError(IStatus status) {
		if (status == null) {
			return;
		}

		String genericTitle = WorkbenchNavigatorMessages.DropAdapter_title;
		int codes = IStatus.ERROR | IStatus.WARNING;

		// simple case: one error, not a multistatus
		if (!status.isMultiStatus()) {
			ErrorDialog
					.openError(getShell(), genericTitle, null, status, codes);
			return;
		}

		// one error, single child of multistatus
		IStatus[] children = status.getChildren();
		if (children.length == 1) {
			ErrorDialog.openError(getShell(), status.getMessage(), null,
					children[0], codes);
			return;
		}
		// several problems
		ErrorDialog.openError(getShell(), genericTitle, null, status, codes);
	}
632887
def error_catcher(self, extra_info: Optional[str] = None):
        
        try:
            yield
        except InstaloaderException as err:
            if extra_info:
                self.error('{}: {}'.format(extra_info, err))
            else:
                self.error('{}'.format(err))
            if self.raise_all_errors:
                raise
586469
def error(self, message, *args, **kwargs):
        
        self.system.error(message, *args, **kwargs)
565575
def add_error_handlers(app):
    """"""

    def handle_validation_error(error):
        response = jsonify({'message': str(error)})
        response.status_code = error.status_code
        return response

    app.errorhandler(ValidationError)(handle_validation_error)
1246834
public static void showErrorDialog(String message, String details) {

        Window window = prepareWindow(DialogWidth.wide);
        window.setCaption("Error");
        window.setContent(new CmsSetupErrorDialog(message, details, null, window));
        A_CmsUI.get().addWindow(window);

    }
1189711
function onError(callback) {
  var code = (arguments.length > 1) ? arguments[1] : 0;
  fire('open.error', code);
  if (typeof callback === 'function') {
    callback(code);
  }
  return code;
}
908747
def allowed_error_messages(*error_messages):
    
    def wrapper(func):
        setattr(func, ALLOWED_ERROR_MESSAGES, error_messages)
        return func
    return wrapper
777721
def error(message, url, line, column, key)
      @procs[:html_parser].each { |handler| handler.call(message, url, line, column, key) }
    end
990778
def _handle_error(self, text, ErrorClass, infile, cur_index):
        
        line = infile[cur_index]
        cur_index += 1
        message = text % cur_index
        error = ErrorClass(message, cur_index, line)
        if self.raise_errors:
            # raise the error - parsing stops here
            raise error
        # store the error
        # reraise when parsing has finished
        self._errors.append(error)
37060
def error_msg_callback(self, callback):
        """"""
        if callable(callback):
            self._error_msg_callback = callback
        else:
            self._error_msg_callback = None
1130029
def raise_on_errors(self):
        
        if self.errors:
            raise NotificationError(
                provider=self.provider,
                data=self.data,
                errors=self.errors,
                response=self.response,
            )
531202
function(model, options) {
    var error = options.error;
    options.error = function(resp) {
      if (error) error.call(options.context, model, resp, options);
      model.trigger('error', model, resp, options);
    };
  }
338062
protected void showError (Throwable cause, Widget near)
    {
        if (near == null) {
            Popups.error(formatError(cause));
        } else {
            Popups.errorBelow(formatError(cause), near);
        }
    }
423889
def build_errors(type, category = nil, row = nil, column = nil, content = nil, constraints = {})
      @errors << Csvlint::ErrorMessage.new(type, category, row, column, content, constraints)
    end
1254571
def handleError(self, error_code, message):
        ''''''
        self._fail = True
        self.reason = error_code
        self._error = message
405849
def raise_args_err(message='bad arguments', error_class=TypeError):
    
    frame = inspect.currentframe().f_back
    raise error_class(message + ': ' + format_call(frame))
664187
def error(self, message, set_error_state=False):
        
        if set_error_state:
            if message not in self._errors:
                self._errors.append(message)

            self.set_error_state()

        self.logger.error(message)