Merge pull request #293 from mendelmaleh/try_handler_check

Try/except handler.check()
This commit is contained in:
Dan 2019-08-01 08:38:47 +02:00 committed by GitHub
commit b207b028dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,8 +166,13 @@ class Dispatcher:
args = None
if isinstance(handler, handler_type):
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)