2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-31 22:35:36 +00:00

Update docs

This commit is contained in:
Dan
2018-02-22 13:07:41 +01:00
parent 7439e1e8f2
commit 197539809a
2 changed files with 10 additions and 7 deletions

View File

@@ -43,17 +43,18 @@ Examples
except UnknownError:
pass
Exceptions may also contain some informative values which can be useful.
e.g. :obj:`FloodWait <pyrogram.api.errors.exceptions.flood_420.FloodWait>` holds the amount of seconds you have to wait before you
can try again. The value is always stored in the ``x`` field of the returned exception object:
Exception objects may also contain some informative values.
E.g.: :obj:`FloodWait <pyrogram.api.errors.exceptions.flood_420.FloodWait>` holds the amount of seconds you have to wait
before you can try again. The value is always stored in the ``x`` field of the returned exception object:
.. code-block:: python
import time
from pyrogram.api.errors import FloodWait
try:
...
except FloodWait as e:
print(e.x)
time.sleep(e.x)
**TODO: Better explanation on how to deal with exceptions**