Log errors when a plugin's control throws exceptions instead of just letting WPF die.

Also add some new types for Essentials
This commit is contained in:
Brant Martin
2019-06-25 16:47:54 -04:00
parent ae3d1262f5
commit 3f7e95b502
6 changed files with 450 additions and 4 deletions

View File

@@ -55,6 +55,15 @@ quit";
AppDomain.CurrentDomain.UnhandledException += HandleException;
#endif
#if DEBUG
//enables logging debug messages when built in debug mode. Amazing.
LogManager.Configuration.AddRule(LogLevel.Debug, LogLevel.Debug, "main");
LogManager.Configuration.AddRule(LogLevel.Debug, LogLevel.Debug, "console");
LogManager.Configuration.AddRule(LogLevel.Debug, LogLevel.Debug, "wpf");
LogManager.ReconfigExistingLoggers();
Log.Debug("Debug logging enabled.");
#endif
// This is what happens when Keen is bad and puts extensions into the System namespace.
if (!Enumerable.Contains(args, "-noupdate"))
RunSteamCmd();