TypeName | CatchEmptyAnalyzer |
Check Id | CC0003 |
Category | Design |
Severity | Warning |
Catch statements with no Exception as an argument is not recommended. Consider adding an Exception class to the catch statement.
try
{
// do something
}
catch
{
int x = 0;
}
A code fix will be presented to you that will transform the code:
try
{
// do something
}
catch (Exception ex)
{
int x = 0;
}
TBD