コード例 #1
0
def _throw_uncontrolled_server_error(resp):
    """Throws an unknown server error.

    """
    raise exceptions.WebServiceException(
        "An uncontrolled server side failure has occurred: {0}".format(
            resp.text))
コード例 #2
0
def _throw_server_error(resp):
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "A server side failure has occurred: {0}".format(resp.text))
コード例 #3
0
def _throw_timeout_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "Remote API server connection timed out.")
コード例 #4
0
def _throw_http_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "Invalid HTTP response from remote API server.")
コード例 #5
0
def _throw_not_found_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException("Could not find remote resource.")
コード例 #6
0
def _throw_connection_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "Could not connect to remote API server.")