mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Try/except handler.check()
Previously, when handler.check raised errors, it would be excepted by the try on line 153, and would fail to loop through the rest of the groups/handlers.
This commit is contained in:
parent
d875298937
commit
02451ffeb5
@ -166,8 +166,13 @@ class Dispatcher:
|
||||
args = None
|
||||
|
||||
if isinstance(handler, handler_type):
|
||||
if handler.check(parsed_update):
|
||||
args = (parsed_update,)
|
||||
try:
|
||||
if handler.check(parsed_update):
|
||||
args = (parsed_update,)
|
||||
except Exception as e:
|
||||
log.error(e, exc_info=True)
|
||||
continue
|
||||
|
||||
elif isinstance(handler, RawUpdateHandler):
|
||||
args = (update, users, chats)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user