3 Commits
0.4 ... 0.5

Author SHA1 Message Date
Ben
2d448ed850 Merge branch 'master' of https://github.com/ben-wallis/Filtration.git 2015-07-02 22:02:55 +01:00
Ben
bf4781dbde Added application-level unhandled exception handler 2015-07-02 22:02:51 +01:00
Ben Wallis
b889f1ef9a Update README.md 2015-07-02 20:47:00 +01:00
3 changed files with 17 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
using System.IO.Compression; using System;
using System.IO.Compression;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Threading;
using AutoMapper; using AutoMapper;
using Castle.Facilities.TypedFactory; using Castle.Facilities.TypedFactory;
using Castle.MicroKernel.ModelBuilder.Inspectors; using Castle.MicroKernel.ModelBuilder.Inspectors;
@@ -57,14 +59,23 @@ namespace Filtration
Mapper.CreateMap<IThemeViewModel, Theme>(); Mapper.CreateMap<IThemeViewModel, Theme>();
Mapper.AssertConfigurationIsValid(); Mapper.AssertConfigurationIsValid();
DispatcherUnhandledException += OnDispatcherUnhandledException;
var mainWindow = _container.Resolve<IMainWindow>(); var mainWindow = _container.Resolve<IMainWindow>();
mainWindow.Show(); mainWindow.Show();
} }
public void TestTest() public void OnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{ {
var exception = e.Exception.Message + Environment.NewLine + e.Exception.StackTrace;
var innerException = e.Exception.InnerException != null
? e.Exception.InnerException.Message + Environment.NewLine +
e.Exception.InnerException.StackTrace
: string.Empty;
MessageBox.Show(
exception + Environment.NewLine + innerException,
"Unhandled Exception", MessageBoxButton.OK, MessageBoxImage.Error);
} }
protected override void OnExit(ExitEventArgs e) protected override void OnExit(ExitEventArgs e)

View File

@@ -139,6 +139,7 @@ namespace Filtration.ViewModels
} }
}); });
CheckForUpdates(); CheckForUpdates();
throw new Exception("Test of dispatcher exception handler");
} }
public RelayCommand OpenScriptCommand { get; private set; } public RelayCommand OpenScriptCommand { get; private set; }

View File

@@ -3,9 +3,9 @@
Filtration is an editor for Path of Exile item filter scripts. Filtration is an editor for Path of Exile item filter scripts.
## Current Release ## Current Release
<b>Installer (5.82mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.3/filtration_0.3_setup.exe">filtration_0.3_setup.exe</a> <b>Installer (5.98mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.4/filtration_0.4_setup.exe">filtration_0.4_setup.exe</a>
<b>Zip File (7.22mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.3/filtration_0.3.zip">filtration_0.3.zip</a> <b>Zip File (7.4mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.4/filtration_0.4.zip">filtration_0.4.zip</a>
## System Requirements ## System Requirements
Filtration requires .NET Framework 4.5.1 installed. Filtration requires .NET Framework 4.5.1 installed.