Get more information about the latest X server error.
518961
def get_error_details(self):
        # type: () -> Optional[Dict[str, Any]]
        

        details = {}  # type: Dict[str, Any]

        if ERROR.details:
            details = {"xerror_details": ERROR.details}
            ERROR.details = None
            xserver_error = ctypes.create_string_buffer(1024)
            self.xlib.XGetErrorText(
                MSS.display,
                details.get("xerror_details", {}).get("error_code", 0),
                xserver_error,
                len(xserver_error),
            )
            xerror = xserver_error.value.decode("utf-8")
            if xerror != "0":
                details["xerror"] = xerror

        return details
1158861
private function getXmlErrorMessage()
    {
        $errors = libxml_get_errors();
        if (count($errors)) {
            /** @var \LibXMLError $error */
            $error = array_shift($errors);
            return $error->message;
        }

        return 'Unknown error withing SimpleXML parser occured.';
    }
912624
def error_response(error_type="Internal server error",
                   error_text=None,
                   status=400,
                   participant=None):
    """"""
    traceback.print_exc()
    print("Error: {}.".format(error_type))

    page = error_page(
        error_text=error_text,
        error_type=error_type,
        participant=participant)

    data = {
        "status": "error",
        "html": page
    }
    return Response(dumps(data), status=status, mimetype='application/json')
494615
def show_error(self, *messages):
        """"""
        if not self.quiet:
            self.display(messages, main_sig, debug=True)
544835
function handleDownloadFailure(message) {
        console.log("AutoUpdate : Download of latest installer failed in Attempt " +
            (MAX_DOWNLOAD_ATTEMPTS - downloadAttemptsRemaining) + ".\n Reason : " + message);

        if (downloadAttemptsRemaining) {

            // Retry the downloading
            attemptToDownload();
        } else {

            // Download could not completed, all attempts exhausted
            enableCheckForUpdateEntry(true);
            UpdateStatus.cleanUpdateStatus();

            var descriptionMessage = "",
                analyticsDescriptionMessage = "";
            if (message === _nodeErrorMessages.DOWNLOAD_ERROR) {
                descriptionMessage = Strings.DOWNLOAD_ERROR;
                analyticsDescriptionMessage = "Error occurred while downloading.";
            } else if (message === _nodeErrorMessages.NETWORK_SLOW_OR_DISCONNECTED) {
                descriptionMessage = Strings.NETWORK_SLOW_OR_DISCONNECTED;
                analyticsDescriptionMessage = "Network is Disconnected or too slow.";
            }
            HealthLogger.sendAnalyticsData(
                autoUpdateEventNames.AUTOUPDATE_DOWNLOAD_FAILED,
                "autoUpdate",
                "download",
                "fail",
                analyticsDescriptionMessage
            );
            UpdateInfoBar.showUpdateBar({
                type: "error",
                title: Strings.DOWNLOAD_FAILED,
                description: descriptionMessage
            });

            setUpdateStateInJSON("autoUpdateInProgress", false);
        }

    }
1366137
def get_error_info(self) -> Tuple[Optional[str], Optional[str]]:
        """"""
        etag = self.find1("error-app-tag")
        emsg = self.find1("error-message")
        return (etag.argument if etag else None, emsg.argument if emsg else None)
731202
def raise_error(self, status=500, message="Generic server error.  Out of luck..."):
        
        self.set_status(status)
        self.write({"message" : message,
                    "status" : status})
125450
function(err, req, res, next) {
    if (err) {
        var url = req.url || '';

        log.debug(req.method, req.headers);
        log.error(('Requested url: ' + url).red, ('Error: ' + err.stack).red);

        if (req.xhr) {
            res.status(500).json({msg: 'Server error'});
        } else {
            res.status(500).send('Server error');
        }
    } else {
        next();
    }
}
1149700
def error(self, message):
        """"""
        sys.stderr.write('error: %s\n\n' % message)
        self.print_help()
        sys.exit(2)
954367
def error(bot, update, error):
    """"""
    logger.error('Update {} caused error {}'.format(update, error), extra={"tag": "err"})
196235
def _extract_msg_from_last_exception():
    '''  '''
    last_exc_type, last_error, last_traceback = sys.exc_info()
    if isinstance(last_error, exceptions.DXAPIError):
        # Using the same code path as below would not
        # produce a useful message when the error contains a
        # 'details' hash (which would have a last line of
        # '}')
        return last_error.error_message()
    else:
        return traceback.format_exc().splitlines()[-1].strip()
658125
def _get_unknown_error_response(self, request, exc):
        

        logging.getLogger('devil').error(
            'while doing %s on %s with [%s], devil caught: %s' % (
                request.method, request.path_info, str(request.GET), str(exc)), exc_info=True)

        if settings.DEBUG:
            raise
        else:
            return HttpResponse(status=codes.INTERNAL_SERVER_ERROR[1])
1080353
def error(self, id, errorCode, errorString):
        ''''''
        if errorCode == 165: # Historical data sevice message
            sys.stderr.write("TWS INFO - %s: %s\n" % (errorCode, errorString))
        elif errorCode >= 501 and errorCode < 600: # Socket read failed
            sys.stderr.write("TWS CLIENT-ERROR - %s: %s\n" % (errorCode, errorString))
        elif errorCode >= 100 and errorCode < 1100:
            sys.stderr.write("TWS ERROR - %s: %s\n" % (errorCode, errorString))
        elif errorCode >= 1100 and errorCode < 2100:
            sys.stderr.write("TWS SYSTEM-ERROR - %s: %s\n" % (errorCode, errorString))
        elif errorCode in (2104, 2106, 2108):
            sys.stderr.write("TWS INFO - %s: %s\n" % (errorCode, errorString))
        elif errorCode >= 2100 and errorCode <= 2110:
            sys.stderr.write("TWS WARNING - %s: %s\n" % (errorCode, errorString))
        else:
            sys.stderr.write("TWS ERROR - %s: %s\n" % (errorCode, errorString))
396786
def server_error(request, template_name='500.html'):
    
    t = loader.get_template(template_name)
    return HttpResponseServerError(
        t.render(Context({'STATIC_URL': settings.STATIC_URL})))
1131632
function _handleXhrError(observer, textStatus, errorThrown) {
  // IE9: cross-domain request may be considered errors
  if (!errorThrown) {
    errorThrown = new Error(textStatus);
  }

  observer.onError(errorThrown);
}
794732
def _server_error_message(url, message):
    """"""
    msg = _error_message.format(url=url, message=message)
    log.error(msg)
    return msg
1277117
def error_404(request, exception):
    """"""
    return django.http.HttpResponseNotFound(
        d1_common.types.exceptions.NotFound(
            0,
            'Invalid API endpoint',
            # Include the regexes the URL was tested against
            # traceInformation=str(exception),
            nodeId=django.conf.settings.NODE_IDENTIFIER,
        ).serialize_to_transport(xslt_url=django.urls.base.reverse('home_xslt')),
        d1_common.const.CONTENT_TYPE_XML,
    )