mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
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
25 lines
703 B
C#
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());
|
|
};
|
|
}
|
|
}
|
|
} |