-
-
Notifications
You must be signed in to change notification settings - Fork 766
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
Swallow exception fixes #3525
Swallow exception fixes #3525
Conversation
What all by default ignored exceptions have in common is that none of their constructors allows to pass an exception as the cause. Thus, it does not make sense to complain when these are used in the catch body to replace the original exception. Fixes detekt#3524.
47f7d8f
to
0461e8e
Compare
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.
Cool, thanks for improving this rule! 🙂
I think a sample or sentence in the rule doc could help to better recall this change.
Codecov Report
@@ Coverage Diff @@
## master #3525 +/- ##
============================================
+ Coverage 77.56% 77.57% +0.01%
- Complexity 2825 2826 +1
============================================
Files 463 463
Lines 8745 8746 +1
Branches 1703 1704 +1
============================================
+ Hits 6783 6785 +2
Misses 1038 1038
+ Partials 924 923 -1
Continue to review full report at Codecov.
|
I've anyway filed another ticket for improving the docs, see #3523. Will do that when addressing that issue, too. |
@sschuberth good to know. It's okay for me. LGTM! |
Will this still make it into 1.16.0 final? (As I believe otherwise more people will come across this issue, as this rule is active by default starting with 1.16.0.) |
yes 🙂 |
As a follow-up to detekt#3525.
What all by default ignored exceptions have in common is that none of
their constructors allows to pass an exception as the cause. Thus, it
does not make sense to complain when these are used in the catch body to
replace the original exception.
Fixes #3524.