mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-11 00:22:29 +03:00
Properly handle exception cases during update dispatch
This commit is contained in:
parent
ab6d60dab2
commit
96b4059ae8
|
@ -225,8 +225,11 @@ async def _dispatch(self, update):
|
||||||
if handler._filter(event):
|
if handler._filter(event):
|
||||||
try:
|
try:
|
||||||
await handler._callback(event)
|
await handler._callback(event)
|
||||||
|
except StopPropagation:
|
||||||
|
self._dispatching_update_handlers = False
|
||||||
|
return
|
||||||
except Exception:
|
except Exception:
|
||||||
name = getattr(handler.callback, '__name__', repr(handler.callback))
|
name = getattr(handler._callback, '__name__', repr(handler._callback))
|
||||||
self._log[__name__].exception('Unhandled exception on %s (this is likely a bug in your code)', name)
|
self._log[__name__].exception('Unhandled exception on %s (this is likely a bug in your code)', name)
|
||||||
except NotResolved as nr:
|
except NotResolved as nr:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user