0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 02:30: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,9 +131,18 @@ namespace SPT.Launcher
WorkingDirectory = gamePath, WorkingDirectory = gamePath,
}; };
try
{
Process.Start(clientProcess); Process.Start(clientProcess);
LogManager.Instance.Info("[LaunchGame] Game process started"); LogManager.Instance.Info("[LaunchGame] Game process started");
} }
catch (Exception ex)
{
LogManager.Instance.Exception(ex);
return GameStarterResult.FromError(-7);
}
}
return GameStarterResult.FromSuccess(); return GameStarterResult.FromSuccess();
} }

View File

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