marinasundstrom / CheckedExceptionsAnalyzer

0 stars 0 forks source link

Handle re-throws with "throw;" #11

Open marinasundstrom opened 4 days ago

marinasundstrom commented 4 days ago

Handle re-throws with throw; in catch-block.

try 
{
    throw new InvalidOperationException();
}
catch(InvalidOperationException) 
{
    // Assumes "InvalidOperationException" 
    throw;
}

And for:

try 
{
    throw new InvalidOperationException();
}
catch 
{
    // Assumes "Exception" 
    throw;
}