mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-05 06:44:51 +00:00
Merge pull request #293 from mendelmaleh/try_handler_check
Try/except handler.check()
This commit is contained in:
commit
b207b028dc
1 changed files with 7 additions and 2 deletions
|
|
@ -166,8 +166,13 @@ class Dispatcher:
|
||||||
args = None
|
args = None
|
||||||
|
|
||||||
if isinstance(handler, handler_type):
|
if isinstance(handler, handler_type):
|
||||||
if handler.check(parsed_update):
|
try:
|
||||||
args = (parsed_update,)
|
if handler.check(parsed_update):
|
||||||
|
args = (parsed_update,)
|
||||||
|
except Exception as e:
|
||||||
|
log.error(e, exc_info=True)
|
||||||
|
continue
|
||||||
|
|
||||||
elif isinstance(handler, RawUpdateHandler):
|
elif isinstance(handler, RawUpdateHandler):
|
||||||
args = (update, users, chats)
|
args = (update, users, chats)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue