Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id

if (!isLoaded)
{
GameReports.PrintIsDead();
GameReports.GameIsDead(applicationParametersParser);
return;
}

Expand All @@ -255,7 +255,7 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id

if (!isLoaded)
{
GameReports.PrintIsDead();
GameReports.GameIsDead(applicationParametersParser);
return;
}

Expand Down Expand Up @@ -284,7 +284,7 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id

if (await bootstrap.InitializePluginsAsync(staticContainer!, dynamicWorldContainer!, scenePluginSettingsContainer, globalPluginSettingsContainer, bootstrapContainer.Analytics.Controller, ct))
{
GameReports.PrintIsDead();
GameReports.GameIsDead(applicationParametersParser);
return;
}

Expand All @@ -306,7 +306,7 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id
catch (Exception)
{
// unhandled exception
GameReports.PrintIsDead();
GameReports.GameIsDead(applicationParametersParser);
throw;
}

Expand Down
10 changes: 8 additions & 2 deletions Explorer/Assets/DCL/Infrastructure/Global/GameReports.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
using DCL.Diagnostics;
using Global.AppArgs;
using System.Runtime.CompilerServices;
using UnityEngine;

namespace Global
{
public static class GameReports
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void PrintIsDead()
public static void GameIsDead(IAppArgs appArgs)
{
ReportHub.LogError(ReportCategory.ENGINE, "Initialization Failed! Game is irrecoverably dead!");
ReportHub.LogError(ReportCategory.ENGINE,
"Initialization Failed! Game is irrecoverably dead!");

if (appArgs.HasFlag(AppArgsFlags.AUTOPILOT))
Application.Quit(1);
}
}
}
Loading