Coc
Coc

Reputation: 447

check if general exception is caught

Is there any rule in Sonarqube 6.7 (sonar-csharp-plugin-7.0) that helps us to check whether a general exception like System.Exception is caught in C# code? Similar rule was available in earlier versions of Sonarqube and not finding equivalent one in newer versions. As this is pretty much kind of basic check expecting it as part of core rule engine, and wondering whether I am missing it.

Upvotes: 0

Views: 89

Answers (1)

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22804

You're looking for "Exception" should not be caught when not required by called methods, which has been implemented for C#.

Upvotes: 1

Related Questions