You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.0 KiB

# -*- coding: utf-8 -*-
"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~
This module contains the set of Requests' exceptions.
"""
13 years ago
13 years ago
class RequestException(RuntimeError):
"""There was an ambiguous exception that occurred while handling your
request."""
13 years ago
class HTTPError(RequestException):
"""An HTTP error occurred."""
13 years ago
response = None
13 years ago
class ConnectionError(RequestException):
"""A Connection error occurred."""
13 years ago
14 years ago
class SSLError(ConnectionError):
"""An SSL error occurred."""
13 years ago
class Timeout(RequestException):
"""The request timed out."""
13 years ago
class URLRequired(RequestException):
"""A valid URL is required to make a request."""
13 years ago
class TooManyRedirects(RequestException):
"""Too many redirects."""
13 years ago
13 years ago
13 years ago
class MissingSchema(RequestException, ValueError):
"""The URL schema (e.g. http or https) is missing."""
13 years ago
13 years ago
class InvalidSchema(RequestException, ValueError):
13 years ago
"""See defaults.py for valid schemas."""
13 years ago
13 years ago
class InvalidURL(RequestException, ValueError):
""" The URL provided was somehow invalid. """