-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the catch utility decorator #16
Conversation
@dbrattli please let me know if there's anything you want me to add, remove, or correct! |
Codecov Report
@@ Coverage Diff @@
## main #16 +/- ##
==========================================
+ Coverage 80.23% 80.32% +0.09%
==========================================
Files 37 38 +1
Lines 2130 2140 +10
==========================================
+ Hits 1709 1719 +10
Misses 421 421
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks useful 👍
Could also support multiple exception types without chaining decorators by packing the exception parameter like this:
Usage example:
|
This is great! I also like the suggestion by @erlendvollset but we could do that as a separate PR to avoid blocking this PR. |
Co-authored-by: Erlend vollset <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Implements the utility decorator
catch
per the discussion in #5.