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
Get error in case like this:
throw response.StatusCode switch { HttpStatusCode.NotFound => new NotFoundException("Not found error"), _ => new ApiException("Api exception") };
And to fix this error I need to do something like this:
throw response.StatusCode switch { HttpStatusCode.NotFound => new NotFoundException("Not found error"), _ => new ApiException("Api exception") } ;
I also can introduce variable for exception and then throw it, and It's also not a good decision Can it be fixed or I'm doing something wrong?
The text was updated successfully, but these errors were encountered:
Allow object initializers and switch expressions in throw statements
4fdcbcf
Fixes DotNetAnalyzers#3410
sharwell
Successfully merging a pull request may close this issue.
Get error in case like this:
And to fix this error I need to do something like this:
I also can introduce variable for exception and then throw it, and It's also not a good decision
Can it be fixed or I'm doing something wrong?
The text was updated successfully, but these errors were encountered: