static void LogException(object sender, UnhandledExceptionEventArgs e) { if (!(e.ExceptionObject is Exception)) { LoggingManager.SendError("APPCRASH - UNABLE TO PROVIDE CRASH INFORMATION"); return; } var exp = (Exception)e.ExceptionObject; LoggingManager.SendError("APPCRASH"); LoggingManager.SendMessage("PlugIns in use:\n{0}", FileTypeManager.GetPluginListing()); LoggingManager.SendMessage("Mod info:\n{0}", ModManager.GetDebugInfo()); LoggingManager.HandleException(exp); LoggingManager.SendMessage("END OF APPCRASH INFO"); UIHelper.ShowError("Application crashed! Please post your Logfile on the RelicNews forums!"); }