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
schalkms
left a comment
There was a problem hiding this comment.
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.