Skip to content

Update the when keyword exception filter sample to .NET 11 - #2420

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/70102-csharp-when-keyword-handling-exceptions
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/70102-csharp-when-keyword-handling-exceptions

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets both projects to net11.0 and updates the test packages. The number filter now matches text that the current runtime message still contains, and the Guid filter matches the messages Guid.Parse actually produces, so both handlers run again. The rethrow-only catch clauses and the console banner are removed, the lottery prompt is fixed, and a new FilterBehavior class shows a property filter, the stack seen from a filter versus a catch block, logging from a filter that returns false, and a filter that throws. New tests drive every filter through redirected console input and cover each FilterBehavior method.

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