wabbajack/Wabbajack/App.xaml.cs

33 lines
936 B
C#
Raw Normal View History

using System;
2019-11-28 08:00:43 +00:00
using System.Linq;
using System.Reflection;
using System.Windows;
2019-11-28 08:00:43 +00:00
using MahApps.Metro;
using Wabbajack.Common;
2019-07-22 22:17:46 +00:00
namespace Wabbajack
{
/// <summary>
2019-09-14 04:35:42 +00:00
/// Interaction logic for App.xaml
2019-07-22 22:17:46 +00:00
/// </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.Log("Uncaught error:");
Utils.Log(((Exception)e.ExceptionObject).ExceptionToString());
};
var appPath = Assembly.GetExecutingAssembly().Location;
if (!ExtensionManager.IsAssociated() || ExtensionManager.NeedsUpdating(appPath))
{
ExtensionManager.Associate(appPath);
}
}
2019-07-22 22:17:46 +00:00
}
2019-11-24 08:12:28 +00:00
}