From 19346fa9068878af516cdb670bea4f791337507b Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 29 Sep 2013 05:12:56 -0400 Subject: Initial commit --- requests/exceptions.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 requests/exceptions.py (limited to 'requests/exceptions.py') diff --git a/requests/exceptions.py b/requests/exceptions.py new file mode 100644 index 0000000..c7b98e6 --- /dev/null +++ b/requests/exceptions.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +""" +requests.exceptions +~~~~~~~~~~~~~~~~~~~ + +This module contains the set of Requests' exceptions. + +""" + +class RequestException(Exception): + """There was an ambiguous exception that occurred while handling your + request.""" + +class HTTPError(RequestException): + """An HTTP error occurred.""" + +class ConnectionError(RequestException): + """A Connection error occurred.""" + +class SSLError(ConnectionError): + """An SSL error occurred.""" + +class Timeout(RequestException): + """The request timed out.""" + +class URLRequired(RequestException): + """A valid URL is required to make a request.""" + +class TooManyRedirects(RequestException): + """Too many redirects.""" -- cgit v1.2.3-70-g09d2