Skip to content

Commit 09cb359

Browse files
authored
Emit an error message if the runtime fails to initialize, instead of just silently aborting (#116171)
Emit an error message if the runtime fails to initialize, instead of just silently aborting
1 parent 3427e5f commit 09cb359

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/coreclr/nativeaot/Runtime/thread.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,10 @@ void Thread::EnsureRuntimeInitialized()
12321232
if (g_RuntimeInitializationCallback != NULL)
12331233
{
12341234
if (g_RuntimeInitializationCallback() != 0)
1235+
{
1236+
PalPrintFatalError("\nFatal error. .NET runtime failed to initialize.\n");
12351237
RhFailFast();
1238+
}
12361239

12371240
g_RuntimeInitializationCallback = NULL;
12381241
}

0 commit comments

Comments
 (0)