exceptions.py 828 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # -*- coding: utf-8 -*-
  2. """
  3. hyper/http20/exceptions
  4. ~~~~~~~~~~~~~~~~~~~~~~~
  5. This defines exceptions used in the HTTP/2 portion of hyper.
  6. """
  7. class HTTP20Error(Exception):
  8. """
  9. The base class for all of ``hyper``'s HTTP/2-related exceptions.
  10. """
  11. pass
  12. class HPACKEncodingError(HTTP20Error):
  13. """
  14. An error has been encountered while performing HPACK encoding.
  15. """
  16. pass
  17. class HPACKDecodingError(HTTP20Error):
  18. """
  19. An error has been encountered while performing HPACK decoding.
  20. """
  21. pass
  22. class ConnectionError(HTTP20Error):
  23. """
  24. The remote party signalled an error affecting the entire HTTP/2
  25. connection, and the connection has been closed.
  26. """
  27. pass
  28. class ProtocolError(HTTP20Error):
  29. """
  30. The remote party violated the HTTP/2 protocol.
  31. """
  32. pass