Give descriptions to utils.http.HTTPException subclasses
This commit is contained in:
parent
9c5c8cf563
commit
97810db8df
1 changed files with 6 additions and 2 deletions
|
@ -15,11 +15,15 @@ SOUP_CONTENT_TYPES = ["text/html", "text/xml", "application/xml"]
|
||||||
class HTTPException(Exception):
|
class HTTPException(Exception):
|
||||||
pass
|
pass
|
||||||
class HTTPTimeoutException(HTTPException):
|
class HTTPTimeoutException(HTTPException):
|
||||||
pass
|
def __init__(self):
|
||||||
|
Exception.__init__(self, "HTTP request timed out")
|
||||||
class HTTPParsingException(HTTPException):
|
class HTTPParsingException(HTTPException):
|
||||||
|
def __init__(self):
|
||||||
|
Exception.__init__(self, "HTTP parsing failed")
|
||||||
pass
|
pass
|
||||||
class HTTPWrongContentTypeException(HTTPException):
|
class HTTPWrongContentTypeException(HTTPException):
|
||||||
pass
|
def __init__(self):
|
||||||
|
Exception.__init__(self, "HTTP request gave wrong content type")
|
||||||
|
|
||||||
def throw_timeout():
|
def throw_timeout():
|
||||||
raise HTTPTimeoutException()
|
raise HTTPTimeoutException()
|
||||||
|
|
Loading…
Reference in a new issue