exceptions.py 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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
  33. class StreamResetError(HTTP20Error):
  34. """
  35. A stream was forcefully reset by the remote party.
  36. """
  37. pass