exceptions.py 695 B

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. """Collection of exceptions raised by requests-toolbelt."""
  3. class StreamingError(Exception):
  4. """Used in :mod:`requests_toolbelt.downloadutils.stream`."""
  5. pass
  6. class VersionMismatchError(Exception):
  7. """Used to indicate a version mismatch in the version of requests required.
  8. The feature in use requires a newer version of Requests to function
  9. appropriately but the version installed is not sufficient.
  10. """
  11. pass
  12. class RequestsVersionTooOld(Warning):
  13. """Used to indicate that the Requests version is too old.
  14. If the version of Requests is too old to support a feature, we will issue
  15. this warning to the user.
  16. """
  17. pass