-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[0.63] Allow propagating WinRTWebSocketResource constructor exceptions #7898
Conversation
…osoft#7892) * Correctly format message on hresult_error * Remove noexcept from public constructors
Hello @JunielKatarn! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
WinRTWebSocketResource::WinRTWebSocketResource( | ||
IMessageWebSocket &&socket, | ||
IDataWriter &&writer, | ||
Uri &&uri, | ||
vector<ChainValidationResult> &&certExeptions) noexcept |
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.
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.
2 reported at least:
- Malformed
Uri
(i.e.Uri{""}
) - Plain websocket instantiation failure (unknown cause):
MessageWebSocket{}
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.
Maybe worth adding a comment that such exception types could be thrown, so that consumers are at least aware?
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 wish the WinRT docs did that in the first place 😅
This should not be necessary because after this fix the exception will propagate to the JS layer and can be handled gracefully.
While 2.
's causes are still unclear, 1.
is actually very expected if a malformed URI is passed to a component meant to establish a connection.
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.
Awaiting unrelated fix #7918. |
Backport of #7892.
Microsoft Reviewers: Open in CodeFlow