Skip to content

Log cancellation exceptions in the default handler#2838

Open
w3lld1 wants to merge 1 commit into
dotnet:mainfrom
w3lld1:fix-2808-cancellation-exceptions
Open

Log cancellation exceptions in the default handler#2838
w3lld1 wants to merge 1 commit into
dotnet:mainfrom
w3lld1:fix-2808-cancellation-exceptions

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • I report OperationCanceledException through the default exception handler instead of suppressing its diagnostics.
  • I cover both OperationCanceledException and TaskCanceledException with regression tests.
  • I preserve the existing exit code of 1.

Validation

  • ./build.sh --test
  • git diff --check upstream/main...HEAD

Fixes #2808

I report cancellation exceptions through the default error handler instead of silently swallowing their diagnostics.
@w3lld1

w3lld1 commented Jul 16, 2026

Copy link
Copy Markdown
Author

@w3lld1 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

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.

System.CommandLine silently swallows OperationCanceledException and TaskCanceledException

1 participant