Skip to content

Commit 371cdcb

Browse files
authored
Merge pull request #40330 from compnerd/reporting
Concurrency: report errors on failures on Windows
2 parents 38d84ff + de1c3e6 commit 371cdcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/Task.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,13 +1100,13 @@ static void swift_task_asyncMainDrainQueueImpl() {
11001100

11011101
HMODULE hModule = LoadLibraryW(L"dispatch.dll");
11021102
if (hModule == NULL)
1103-
abort();
1103+
swift_reportError(0, "unable to load dispatch.dll");
11041104

11051105
pfndispatch_main =
11061106
reinterpret_cast<void (FAR *)(void)>(GetProcAddress(hModule,
11071107
"dispatch_main"));
11081108
if (pfndispatch_main == NULL)
1109-
abort();
1109+
swift_reportError(0, "unable to locate dispatch_main in dispatch.dll");
11101110

11111111
pfndispatch_main();
11121112
exit(0);

0 commit comments

Comments
 (0)