WinRTWebSocketResource surfaces exceptions on debug builds
Environment
yarn install
yarn build
cd vnext
nuget restore ReactWindows-Desktop.sln
msbuild ReactWindows-Desktop.sln
-
Target Platform Version(s):
10.0.18362 -
Target Device(s): Desktop
-
Visual Studio Version: 16.6.1
-
Build Configuration: x64 | Debug
Steps to Reproduce
From the Test Explorer, run RNTesterIntegrationTests::WebSocket, without setting up a test WebSocket server
(Write your steps here:)
- Go to Test Explorer in Visual Studio.
- Select Test
RNTesterIntegrationTests::WebSocket. - Run test
Note: Do not start the WebSocket test server. These steps are meant to show how the connection error is handled. In consequence, the test is expected to fail.
Expected Behavior
The winrt::hresult_error exception is immediately caught by the corresponding clause in WinRTWebSocketResource::PerformConnect.
Actual Behavior
The exception shows up interrupting the debugging section, even though it does get caught and handled properly.
This happens for every WinRT exception thrown in WinRTWebSocketResource.
Additional context
The UWP implementation relies on awaitable type lessthrow_await_adapter.
See preprocessor flag DEFAULT_CPPWINRT_EXCEPTIONS.
Requested backport to RN60. We are getting feedback from Outlook folks that this is impacting their inner dev loop
@JunielKatarn dupe of #4995 ?
@asklar Yikes! Yes.
Closing as duplicate.