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

PLAT-5359] Assume default behaviour for UnobservedTaskExceptions when app.config does not exist #135

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

yousif-bugsnag
Copy link
Contributor

Goal

for .NET 4.5 Bugsnag attempts to load the App.config file to read the value of the ThrowUnobservedTaskExceptions element and this crashes with a FileNotFoundException if there is no App.config file. This PR guards against App.config not existing

Design

Make sure that the file exists before loading, and assume the default behaviour (UnobservedTaskExceptions do not terminate the process) if the config file doesn't exist.

Changeset

Added a File.Exists check to UnhandledException#DetermineUnobservedTerminates

Testing

Ran the unit tests and tested manually using the example apps in the repository

@yousif-bugsnag yousif-bugsnag changed the base branch from master to next March 8, 2021 18:24
Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@twometresteve twometresteve merged commit 8d9d26a into next Mar 17, 2021
@yousif-bugsnag yousif-bugsnag mentioned this pull request Mar 18, 2021
@yousif-bugsnag yousif-bugsnag deleted the yousif/fix-missing-config-crash branch August 13, 2021 08:29
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.

2 participants