mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added traceback for handlers exception
This commit is contained in:
parent
b1a4136603
commit
f4e66f6807
@ -5951,7 +5951,9 @@ class TeleBot:
|
|||||||
handler_error = e
|
handler_error = e
|
||||||
if self.exception_handler:
|
if self.exception_handler:
|
||||||
self.exception_handler.handle(e)
|
self.exception_handler.handle(e)
|
||||||
else: logging.error(str(e))
|
else:
|
||||||
|
logging.error(str(e))
|
||||||
|
logger.debug("Exception traceback:\n%s", traceback.format_exc())
|
||||||
|
|
||||||
if middlewares:
|
if middlewares:
|
||||||
for middleware in middlewares:
|
for middleware in middlewares:
|
||||||
|
@ -416,6 +416,7 @@ class AsyncTeleBot:
|
|||||||
self.exception_handler.handle(e)
|
self.exception_handler.handle(e)
|
||||||
else:
|
else:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
|
logger.debug("Exception traceback:\n%s", traceback.format_exc())
|
||||||
|
|
||||||
if middlewares:
|
if middlewares:
|
||||||
for middleware in middlewares:
|
for middleware in middlewares:
|
||||||
|
Loading…
Reference in New Issue
Block a user