WPF/WinForms Blazor WebView Exception Handling#40765
Merged
Merged
Conversation
|
Hi @TanayParikh. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document. |
SteveSandersonMS
approved these changes
Mar 18, 2022
Eilon
approved these changes
Mar 18, 2022
|
Hi @TanayParikh. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
TanayParikh
added a commit
that referenced
this pull request
Mar 23, 2022
(cherry picked from commit 7eb1547)
This was referenced Mar 23, 2022
TanayParikh
added a commit
that referenced
this pull request
Mar 24, 2022
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WPF/WinForms Blazor WebView Exception Handling
Currently exceptions within Blazor code are not fatal to the underlying application, resulting in inconsistent behavior and a challenging debugging experience for developers.
Description
Updated exception handling mechanism to throw exceptions from the platform dispatch context instead of directly, so they can be consumed in WPF/WinForms applications using the standard
AppDomain.CurrentDomain.UnhandledExceptionAPI.Other details
Unhandled Exceptionyellow bar within the webview. This had a serialized exception stack trace with limited additional information, making debugging the error more challenging.Helpful blogs on error handling within WPF:
Please note, this is specifically for WPF/WinForms scenarios. It's not entirely clear if there's a canonical way we can do this on MAUI yet (related discussion dotnet/maui#653).
Fixes dotnet/maui#4441
Customer Impact
Provides developers with improved insights on application errors, and increased control over exception handling. When an exception occurs, the app will crash and close, instead of remaining open in a corrupted state.
Regression?
Risk
Changes are specific to WebView for use with Blazor Hybrid. The intention of this change set is to guarantee the application DOES crash.
Verification
Packaging changes reviewed?