From e744706c3f103c4ea2ee4467c718f6098593e214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 23 Oct 2022 16:12:29 +0200 Subject: [PATCH] Log OpenRA and Operating System language on crash. --- OpenRA.Game/Support/ExceptionHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Game/Support/ExceptionHandler.cs b/OpenRA.Game/Support/ExceptionHandler.cs index cebe115bb1ee..86e9ed7c1061 100644 --- a/OpenRA.Game/Support/ExceptionHandler.cs +++ b/OpenRA.Game/Support/ExceptionHandler.cs @@ -26,6 +26,9 @@ public static void HandleFatalError(Exception ex) if (Game.EngineVersion != null) Log.Write("exception", $"OpenRA engine version {Game.EngineVersion}"); + if (Game.Settings != null && Game.Settings.Player != null && Game.Settings.Player.Language != null) + Log.Write("exception", $"OpenRA Language: {Game.Settings.Player.Language}"); + if (Game.ModData != null) { var mod = Game.ModData.Manifest.Metadata; @@ -41,6 +44,7 @@ public static void HandleFatalError(Exception ex) Log.Write("exception", $"Date: {DateTime.UtcNow:u}"); Log.Write("exception", $"Operating System: {Platform.CurrentPlatform} ({Environment.OSVersion})"); Log.Write("exception", $"Runtime Version: {Platform.RuntimeVersion}", Platform.RuntimeVersion); + Log.Write("exception", $"System Language: {CultureInfo.InstalledUICulture} (Installed) {CultureInfo.CurrentCulture} (Current) {CultureInfo.CurrentUICulture} (Current UI)"); var rpt = BuildExceptionReport(ex).ToString(); Log.Write("exception", rpt); Console.Error.WriteLine(rpt);