dotnet / dotnet/dotnet-api-docs

UnobservedTaskExceptionEventArgs.SetObserved mentions old default

Open
#3,210 3 comments 0 reactions 0 assignees View on GitHub
area-System.Threading.Tasks doc-bug Pri2 Pri3 waiting-on-feedback
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

For `UnobservedTaskExceptionEventArgs.SetObserved()` the remarks state:

> The Exception property is used to examine the exception without marking it as observed, whereas the method is used to mark the exception as observed. Marking the exception as observed prevents it from triggering exception escalation policy which, by default, terminates the process.

But "by default" is no longer true. The default does not terminate the process since .net 4.5 because `ThrowUnobservedTaskExceptions` is now false by default.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.