rspec/rules/S5713/description.adoc

8 lines
520 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
Repeating an exception class in a single ``++except++`` statement will not fail but it is not what the developer intended. Either the class is not the one which should be caught, or this is dead code.
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
Having a subclass and a parent class in the same ``++except++`` statement is also useless. It is enough to keep only the parent class.
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
This rule raises an issue when an exception class is duplicated in an ``++except++`` statement, or when an exception class has a parent class in the same ``++except++`` statement.