Skip to content

Catch Multiple Exceptions in C#: update to .NET 10 - #2321

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/63330-csharp-catch-multiple-exceptions
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/63330-csharp-catch-multiple-exceptions

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves both projects in exception-handling/CatchMultipleExceptions to net10.0 and the test packages to MSTest 4.5.1, Microsoft.NET.Test.Sdk 18.11.0 and coverlet.collector 10.1.0, and fixes the test project's ProjectReference, which pointed at a CatchMultipleExceptionsAtOnes folder that does not exist, so the tests build again. The when filter now uses the or pattern, SingleCatchSwitchCase rethrows unlisted exceptions with default: throw;, unused usings are dropped, and a new FilterRunsBeforeUnwinding example with its test shows that an exception filter runs before the inner finally block and the catch body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant