(456804016) Handle exceptions thrown by GameAnalytics.SetEnabledInfoLog in debug builds

This commit is contained in:
Joonas Rikkonen
2019-06-04 15:30:14 +03:00
parent bce99f2e6f
commit 88c4c9a248
@@ -16,9 +16,18 @@ namespace Barotrauma
public static void Init()
{
#if DEBUG
GameAnalytics.SetEnabledInfoLog(true);
try
{
GameAnalytics.SetEnabledInfoLog(true);
}
catch (Exception e)
{
DebugConsole.ThrowError("Initializing GameAnalytics failed. Disabling user statistics...", e);
GameSettings.SendUserStatistics = false;
return;
}
#endif
string exePath = Assembly.GetEntryAssembly().Location;
string exeName = null;
Md5Hash exeHash = null;