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.

31 line
695B

  1. class SocketIOError(Exception):
  2. pass
  3. class ConnectionError(SocketIOError):
  4. pass
  5. class ConnectionRefusedError(ConnectionError):
  6. """Connection refused exception.
  7. This exception can be raised from a connect handler when the connection
  8. is not accepted. The positional arguments provided with the exception are
  9. returned with the error packet to the client.
  10. """
  11. def __init__(self, *args):
  12. if len(args) == 0:
  13. self.error_args = None
  14. elif len(args) == 1:
  15. self.error_args = args[0]
  16. else:
  17. self.error_args = args
  18. class TimeoutError(SocketIOError):
  19. pass
  20. class BadNamespaceError(SocketIOError):
  21. pass