mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Improve check in ExceptionsFilter
This commit is contained in:
parent
c88ee7ed52
commit
99bb5a9fef
1 changed files with 1 additions and 6 deletions
|
|
@ -238,12 +238,7 @@ class ExceptionsFilter(Filter):
|
|||
self.exception = exception
|
||||
|
||||
def check(self, dispatcher, update, exception):
|
||||
try:
|
||||
raise exception
|
||||
except self.exception:
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
return isinstance(exception, self.exception)
|
||||
|
||||
|
||||
def generate_default_filters(dispatcher, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue