2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 06:45:39 +00:00

Merge branch 'master' into dispatcher

This commit is contained in:
Dan
2018-04-08 16:54:38 +02:00

View File

@@ -33,7 +33,11 @@ class Error(Exception):
MESSAGE = None
def __init__(self, x: int or RpcError = None, query_type: type = None):
super().__init__("[{} {}]: {}".format(self.CODE, self.ID or self.NAME, self.MESSAGE.format(x=x)))
super().__init__("[{} {}]: {}".format(
self.CODE,
self.ID or self.NAME,
str(self) or self.MESSAGE.format(x=x)
))
try:
self.x = int(x)