mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge pull request #46 from surik00/dev-1.x
Improve check in ExceptionsFilter
This commit is contained in:
commit
239728ccc6
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