Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

31 lignes
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