Skip to content

Commit

Permalink
Use exception type as key
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Jan 25, 2024
1 parent fa85194 commit e3b1f1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyflowlauncher/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __call__(self, method: str, *args, **kwargs):
try:
return self._methods[method](*args, **kwargs)
except Exception as e:
handler = self._handlers.get(e, None)
handler = self._handlers.get(type(e), None)
if handler:
return handler(e)
# raise e
raise e

0 comments on commit e3b1f1d

Please sign in to comment.