/
Ao
/
MaxReport
Обзор
Документация
Войти
/
Ao
/
MaxReport
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
pgsql/pgAdmin 4/python/Lib/site-packages/socketio/exceptions.py
38 строк
975 B
AoAnima
first_commit
13 июл 2026, 17:47
13 июл 2026, 17:47
f1a670a
Код
Авторство
О чём код?
class SocketIOError(Exception): pass class ConnectionError(SocketIOError): pass class ConnectionRefusedError(ConnectionError): """Connection refused exception. This exception can be raised from a connect handler when the connection is not accepted. The positional arguments provided with the exception are returned with the error packet to the client. """ def __init__(self, *args): if len(args) == 0: self.error_args = {'message': 'Connection rejected by server'} elif len(args) == 1: self.error_args = {'message': str(args[0])} else: self.error_args = {'message': str(args[0])} if len(args) == 2: self.error_args['data'] = args[1] else: self.error_args['data'] = args[1:] class TimeoutError(SocketIOError): pass class BadNamespaceError(SocketIOError): pass class DisconnectedError(SocketIOError): pass