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

Apply WinUI 3 exception handler in Sentry core #1863

Merged
merged 8 commits into from
Aug 19, 2022
Merged

Conversation

mattjohnsonpint
Copy link
Contributor

@mattjohnsonpint mattjohnsonpint commented Aug 19, 2022

Previously we were hooking up the WinUI 3 unhandled exception handler in Sentry.Maui only.

This moves that to an internal integration in Sentry core, so that it can also be used by WinUI 3 apps directly, or by other non-MAUI platforms that can leverage WinUI 3, such as Uno Platform.

Note that this doesn't apply for UWP (WinUI 2) apps. Those will still need to hook up the handler directly, per our configuration guide

I also added a button to the MAUI sample that causes a crash on a background thread, which I used to verify that both types of crashes work. One is caught by this integration, the other is caught by the existing AppDomain integration.

@SimonCropp
Copy link
Contributor

forgive my ignorance, i can bever remember all the windows UI approaches. but isnt uap the tfm for winui? and wouldnt that make this easier?

@mattjohnsonpint
Copy link
Contributor Author

forgive my ignorance, i can bever remember all the windows UI approaches. but isnt uap the tfm for winui? and wouldnt that make this easier?

That's for UWP (WinUI 2). This is for WinUI 3.

Also, having a Windows target would mean a lot of build and CI changes, for repackaging, etc. Better to avoid it if possible.

@SimonCropp
Copy link
Contributor

Also, having a Windows target would mean a lot of build and CI changes, for repackaging, etc. Better to avoid it if possible.

ok. i was assuming u had already considered it. thanks

@SimonCropp
Copy link
Contributor

few minor suggestions above. but nothing that "needs" to be done.

@mattjohnsonpint mattjohnsonpint merged commit 900697b into main Aug 19, 2022
@mattjohnsonpint mattjohnsonpint deleted the winui-integration branch August 19, 2022 06:13
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