0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-12 16:50:43 -05:00

catch game start exceptions

This commit is contained in:
IsWaffle 2024-05-30 11:55:35 -04:00
parent 6e0424a2a7
commit 990939e490
2 changed files with 15 additions and 2 deletions

View File

@ -131,8 +131,17 @@ namespace SPT.Launcher
WorkingDirectory = gamePath,
};
Process.Start(clientProcess);
LogManager.Instance.Info("[LaunchGame] Game process started");
try
{
Process.Start(clientProcess);
LogManager.Instance.Info("[LaunchGame] Game process started");
}
catch (Exception ex)
{
LogManager.Instance.Exception(ex);
return GameStarterResult.FromError(-7);
}
}
return GameStarterResult.FromSuccess();

View File

@ -43,6 +43,10 @@ namespace SPT.Launcher.Models.Launcher
case -6:
Message = LocalizationProvider.Instance.eft_exe_not_found_warning;
break;
case -7:
Message = ":(";
break;
default:
Message = LocalizationProvider.Instance.login_failed;