Skip to content
New issue

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

Unobserved exception handling #125

Merged
merged 6 commits into from
May 13, 2020
Merged

Conversation

twometresteve
Copy link
Contributor

Goal

Correctly respond to UnobservedTaskExceptions, in terms of whether the process will be terminated.

Design

  • For .NET Framework versions prior to 4.5, the process will always terminate.
  • For .NET Framework versions after 4.5, the default behavior is not to terminate, but can be configured to do so. We therefore check for the ThrowUnobservedTaskExceptions configuration.
  • For .NET Standard we will assume that the default behavior holds - not to terminate

Tests

Tested with the standard regression tests, together with manual testing using the examples in the repository.

Discussion

Outstanding Questions

Assuming that the process will not terminate with .NET Standard is not ideal, as it could be configured to do so. However, determining how to check the configuration in a portable way has proven troublesome and so we will address this for concrete examples on a case-by-case basis should the need arise. The default behavior is likely to prevail and is catered for, in any case.

Linked issues

Fixes #116

@twometresteve twometresteve marked this pull request as draft May 12, 2020 11:36
@twometresteve twometresteve force-pushed the unobserved-exception-handling branch from 076a313 to 064d9a8 Compare May 13, 2020 14:56
@twometresteve twometresteve marked this pull request as ready for review May 13, 2020 16:12
@twometresteve twometresteve merged commit 57a827a into next May 13, 2020
@twometresteve twometresteve deleted the unobserved-exception-handling branch May 13, 2020 20:20
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.

None yet

3 participants