mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
fixed overwriting exception args
This commit is contained in:
parent
855b838e91
commit
2565094897
@ -456,7 +456,7 @@ class TeleBot:
|
|||||||
try:
|
try:
|
||||||
typed_middleware_handler(self, getattr(update, update_type))
|
typed_middleware_handler(self, getattr(update, update_type))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
e.args = (f'Typed middleware handler "{typed_middleware_handler.__qualname__}" raised exception: {str(e)}',)
|
e.args = e.args + (f'Typed middleware handler "{typed_middleware_handler.__qualname__}"',)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if len(self.default_middleware_handlers) > 0:
|
if len(self.default_middleware_handlers) > 0:
|
||||||
@ -464,7 +464,7 @@ class TeleBot:
|
|||||||
try:
|
try:
|
||||||
default_middleware_handler(self, update)
|
default_middleware_handler(self, update)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
e.args = (f'Default middleware handler "{typed_middleware_handler.__qualname__}" raised exception: {str(e)}',)
|
e.args = e.args + (f'Default middleware handler "{default_middleware_handler.__qualname__}"',)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def __notify_update(self, new_messages):
|
def __notify_update(self, new_messages):
|
||||||
|
Loading…
Reference in New Issue
Block a user