mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Add errors factory skeleton
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from ._impl import tl as _tl
|
||||
from ._impl.client import Client, Config
|
||||
from ._impl.errors import errors
|
||||
from ._impl.mtproto import RpcError
|
||||
from ._impl.session import Session
|
||||
from .version import __version__
|
||||
|
||||
__all__ = ["_tl", "Client", "Config", "RpcError", "Session"]
|
||||
__all__ = ["_tl", "Client", "Config", "errors", "RpcError", "Session"]
|
||||
|
8
client/src/telethon/_impl/errors.py
Normal file
8
client/src/telethon/_impl/errors.py
Normal file
@@ -0,0 +1,8 @@
|
||||
class ErrorFactory:
|
||||
__slots__ = ()
|
||||
|
||||
def __getattribute__(self, name: str) -> ValueError:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
errors = ErrorFactory()
|
@@ -15,6 +15,8 @@ class RpcError(ValueError):
|
||||
Only occurs when the answer to a request sent to Telegram is not the expected result.
|
||||
The library will never construct instances of this error by itself.
|
||||
|
||||
This is the parent class of all :data:`telethon.errors` subtypes.
|
||||
|
||||
.. seealso::
|
||||
|
||||
:doc:`/concepts/errors`
|
||||
|
Reference in New Issue
Block a user