mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 07:51:44 +00:00
Document the Error class
This commit is contained in:
parent
5c3487dc8a
commit
5e7d9af95d
@ -24,6 +24,9 @@ from .exceptions.all import exceptions
|
|||||||
|
|
||||||
|
|
||||||
class Error(Exception):
|
class Error(Exception):
|
||||||
|
"""This is the base exception class for all Telegram API related errors.
|
||||||
|
For a finer grained control, see the specific errors below.
|
||||||
|
"""
|
||||||
ID = None
|
ID = None
|
||||||
CODE = None
|
CODE = None
|
||||||
NAME = None
|
NAME = None
|
||||||
@ -65,6 +68,10 @@ class Error(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class UnknownError(Error):
|
class UnknownError(Error):
|
||||||
|
"""This object represents an Unknown Error, that is, an error which
|
||||||
|
Pyrogram does not know anything about, yet.
|
||||||
|
"""
|
||||||
CODE = 520
|
CODE = 520
|
||||||
|
""":obj:`int`: Error code"""
|
||||||
NAME = "Unknown error"
|
NAME = "Unknown error"
|
||||||
MESSAGE = "{x}"
|
MESSAGE = "{x}"
|
||||||
|
Loading…
Reference in New Issue
Block a user