2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Display a more meaningful error message

This commit is contained in:
Dan 2022-02-10 20:15:48 +01:00
parent 84b0e15e2b
commit 9279b67319

View File

@ -79,8 +79,8 @@ class Connection:
async def send(self, data: bytes):
try:
await self.protocol.send(data)
except Exception:
raise OSError
except Exception as e:
raise OSError(e)
async def recv(self) -> Optional[bytes]:
return await self.protocol.recv()