static void FatalError(Exception e) { Log.AddChannel("exception", "exception.log"); var rpt = BuildExceptionReport(e).ToString(); Log.Write("exception", "{0}", rpt); Console.Error.WriteLine(rpt); if (Game.Settings.Debug.ShowFatalErrorDialog && !Game.Settings.Server.Dedicated) { Game.Renderer.Device.Quit(); FatalErrorDialog.Show(); } }
static void FatalError(Exception e) { Log.AddChannel("exception", "exception.log"); if (Game.modData != null) { var mod = Game.modData.Manifest.Mod; Log.Write("exception", "{0} Mod at Version {1}", mod.Title, mod.Version); } Log.Write("exception", "Operating System: {0} ({1})", Platform.CurrentPlatform, Environment.OSVersion); Log.Write("exception", "Runtime Version: {0}", Platform.RuntimeVersion); var rpt = BuildExceptionReport(e).ToString(); Log.Write("exception", "{0}", rpt); Console.Error.WriteLine(rpt); if (Game.Settings.Debug.ShowFatalErrorDialog && !Game.Settings.Server.Dedicated) { Game.Renderer.Device.Quit(); FatalErrorDialog.Show(); } }