mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 05:48:14 +00:00
Display a more meaningful error message
This commit is contained in:
parent
84b0e15e2b
commit
9279b67319
@ -79,8 +79,8 @@ class Connection:
|
|||||||
async def send(self, data: bytes):
|
async def send(self, data: bytes):
|
||||||
try:
|
try:
|
||||||
await self.protocol.send(data)
|
await self.protocol.send(data)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
raise OSError
|
raise OSError(e)
|
||||||
|
|
||||||
async def recv(self) -> Optional[bytes]:
|
async def recv(self) -> Optional[bytes]:
|
||||||
return await self.protocol.recv()
|
return await self.protocol.recv()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user