prodot / ReCommended-Extension

Code analysis improvements and context actions
Apache License 2.0
59 stars 11 forks source link

Redundant Exception declaration without exception variable in the catch clause #8

Closed michael-damatov closed 6 years ago

michael-damatov commented 8 years ago

Catching the Exception without declaring the exception variable

try
{
    ...
}
catch (Exception) 
{
    ...
}

is redundant and can be omitted:

try
{
    ...
}
catch 
{
    ...
}

A quick fix is available to remove the exception type declaration.