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.
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
Allow cancellation of navigation events in Blazor #42638
Allow cancellation of navigation events in Blazor #42638
Changes from 26 commits
a7ae3e9
05dc74b
c1f8602
0af6785
298117a
08bc4f0
f8bfc12
ff6b245
1a7aca5
7086ddd
7edfc97
055bedf
0cea6cd
804b451
01c6484
ab6caad
bb4d33b
6f449bb
2fca4ce
3365322
54d7bca
72230e2
4e3cca2
9bfc11e
7684aeb
8e2b8c0
cf17ac7
2771923
22997be
8c017b8
61b99ed
d155810
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should really be treating exceptions thrown in location changing handlers as non-fatal? In the current WebAssembly implementation of this feature, the navigation is canceled if an exception is thrown in the location changing handler. Should we treat it as a critical failure there instead? And, if we decide to make this case non-fatal, should we let the navigation continue if no other handlers cancel it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd err on the side of treating unhandled exceptions as fatal unless there's a definite use case in which developers can't be expected to avoid unhandled exceptions. In this case I expect a developer could use try/catch inside their handler if they are doing something that might fail.
Generally in WebAssembly we've had a more laissez-faire attitude because we're inheriting the JS semantics around errors being something you log but may be able to continue afterwards. On Server, it's much more important to have clearly defined rules about when you can and can't continue after an exception.
If possible, that would be nice. But as long as something ends up in the JS console giving the exception details, that's enough. It just has to be reasonable for the developer to see what went wrong.