We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the event that a catch block simply throws, and it is the last catch block, or the only catch block, then it can be removed.
try { DoSomething(); } catch { throw; } finally { DoSomethingElse(); }
should become:
try { DoSomething(); } finally { DoSomethingElse(); }
If there are multiple catch blocks, and then last one is redundant, then only remove the last one.
try { DoSomething(); } catch (SomeException ex) { HandleException(ex); } catch { throw; }
try { DoSomething(); } catch (SomeException ex) { HandleException(ex); }
And for a try-catch block with only one empty catch block, and no finally block, then the entire thing should be removed
try { DoSomething(); } catch { throw; }
should become
DoSomething();
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
In the event that a catch block simply throws, and it is the last catch block, or the only catch block, then it can be removed.
should become:
If there are multiple catch blocks, and then last one is redundant, then only remove the last one.
should become:
And for a try-catch block with only one empty catch block, and no finally block, then the entire thing should be removed
should become
The text was updated successfully, but these errors were encountered: