Returns an error string from libiperf

        :param error_id: The error_id produced by libiperf
        :rtype: string
503989
def _error_to_string(self, error_id):
        
        strerror = self.lib.iperf_strerror
        strerror.restype = c_char_p
        return strerror(error_id).decode('utf-8')
28332
private String getErrorForUnknownService(String id) {
		StringBuffer error = new StringBuffer();
		error.append("Services path: " + ServiceConfigurationManager.CONFIGURATION_DIR);
		error.append("The service with id: " + id + " is not registered");

		error.append("\n Available services are: ");

		Set<String> keys = serviceManager.getRegisteredConfigurations().keySet();

		Iterator<String> it = keys.iterator();

		while (it.hasNext()) {
			error.append(it.next()).append(" ");
		}

		return error.toString();
	}
294866
def getPropErrorNameFromEnum(self, error):
        

        fn = self.function_table.getPropErrorNameFromEnum
        result = fn(error)
        return result
584747
public static function getUploadErrorMessage($errorId)
    {
        $messagesArray = self::getUploadErrorMessages();
        return isset($messagesArray[$errorId]) ? $messagesArray[$errorId] : 'Unknown upload error.';
    }
130941
def _api_on_write_error(self, status_code, **kwargs):
        

        return_error = { "code": self.get_status() }
        exc_info = kwargs.get("exc_info")

        if exc_info and isinstance(exc_info[1], oz.json_api.ApiError):
            return_error["error"] = exc_info[1].message
        else:
            return_error["error"] = API_ERROR_CODE_MAP.get(self.get_status(), "Unknown error")

        if oz.settings.get("debug"):
            return_error["trace"] = "".join(traceback.format_exception(*exc_info))

        self.finish(return_error)
        return oz.break_trigger
1076880
public Map<String[], String> getErrors(String entityId) {

        return m_errors != null ? m_errors.get(entityId) : null;
    }
256830
def errors_string(self):
        
        output = []
        for e in self.errors:
            output.append('%s: %s in %s:' % (e[1], e[2], e[0]))
            output.append(''.join(traceback.format_tb(e[3])))
        return '\n'.join(output)
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)
199678
def get_bug_by_id(self, bug_id):
        
        uri = '{base}/bugs/{bug_id}'.format(base=self.BASE_URI, bug_id=bug_id)
        resp = self._client.get(uri, model=models.Bug)

        return resp
1326823
function onError( error ) {
		debug( 'Error encountered while querying endpoint: %s', error.message );
		if ( error instanceof Error ) {
			err = {
				'status': 500,
				'message': 'Request error: ' + error.message
			};
			return clbk( err );
		}
		return clbk( error, res, body );
	}
955582
def _state_error(self, reason):
        
        log.err(reason)

        def matchException(failure):
            for errorState, backOff in self.backOffs.iteritems():
                if 'errorTypes' not in backOff:
                    continue
                if failure.check(*backOff['errorTypes']):
                    return errorState

            return 'other'

        errorState = matchException(reason)
        self._reconnect(errorState)
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))
1198212
def logError(self):
        
        # got from http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Error_handling_with_Python
        import traceback

        self.logMsg('ERROR!!!')
        errMsg = traceback.format_exc()
        self.logMsg(errMsg)
        return errMsg
1310202
def error_handler(self, error):
        
        warnings.warn(
            """
            error_handler is deprecated.
            Use FlaskBuzz.build_error_handler instead
            """,
            warnings.DeprecationWarning,
        )
        return error.jsonify(), error.status_code, error.headers
35198
def get_error(self):
        """"""
        exc_info = sys.exc_info()
        if exc_info[0] is None:
            return None
        else:
            err_type, err_value, err_trace = exc_info[0], exc_info[1], None
            if self.verbose and len(exc_info) > 2:
                err_trace = exc_info[2]
            return format_error(err_type, err_value, err_trace)
1329576
def error_handler(_, event):
    # type: (Any, Any) -> int
    

    evt = event.contents
    ERROR.details = {
        "type": evt.type,
        "serial": evt.serial,
        "error_code": evt.error_code,
        "request_code": evt.request_code,
        "minor_code": evt.minor_code,
    }
    return 0
127039
def _check_err(code, request_id):
    
    if code == 3006:
        raise CalendarNotExist()
    elif code == 3007:
        raise CalendarOwnByDiffAccount()
    elif code == 3008:
        raise AccountNotExist()
    elif code == 3009 or code == 3013:
        raise AccountUsedByDiffUser()
    elif code == 3010:
        raise InvalidPermissionLevel()
    elif code == 3011:
        raise FailedToClosePublisher()
    elif code == 3014:
        raise InvalidEmail()
    elif code == 3015:
        raise NoAllowedPermission()
    elif code == 3016:
        raise AccountNameEmpty()
    elif code == 3017 or code == 3018:
        raise ErrorCreatingEditor()
    else:
        logging.getLogger(__name__).warn(
            "Unexpected Error Code: %s with %s" % (
                code, request_id))
        raise UnexpectedError()