wabbajack/Wabbajack/App.xaml.cs
Justin Swanson dcbf3b069f Modified UnhandleException handling
Since we're crashing at this point, calling the GUI's logging systems is moot.  Just log to Utils.Log (which goes to file) before the crash happens
2019-10-22 23:18:16 -05:00

25 lines
703 B
C#

using System;
using System.Windows;
using Wabbajack.Common;
using Wabbajack.Lib.Updater;
namespace Wabbajack
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public App()
{
// Wire any unhandled crashing exceptions to log before exiting
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
// Don't do any special logging side effects
Utils.SetLoggerFn((s) => { });
Utils.Log("Uncaught error:");
Utils.Log(((Exception)e.ExceptionObject).ExceptionToString());
};
}
}
}