7 lines
786 B
Plaintext
7 lines
786 B
Plaintext
=== on 30 Sep 2019, 09:20:07 Andrei Epure wrote:
|
|
\[~nicolas.harraudeau] - this rule is not as useful for Java, where there's the ``++throws++`` keyword in the method signature if there is a call to a method that throws an exception. In C#, there's no such mechanism, so we can just look if there's a ``++throw++`` inside the method body. Is this useful enough?
|
|
|
|
=== on 30 Sep 2019, 10:45:16 Nicolas Harraudeau wrote:
|
|
\[~andrei.epure] indeed the value of this rule is lower. The only real-world use case I see is if there is a ``++throw++`` in a ``++try-catch++`` block and the exceptions caught do not match the one thrown. => Unintentional throw outside of the try-catch block. This is a corner case which will happen very rarely so there is no point in implementing the rule for C#.
|
|
|