static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs args) { Exception e = (Exception)args.ExceptionObject; SingleInstance <App> .Cleanup(); Current.Dispatcher.Invoke(new Action(() => { var box = new ErrorWindow(e); box.ShowDialog(); })); }
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs args) { MessageBox.Show("WiitarThing is about to crash. Press OK to show the crash message.", "Sorry", MessageBoxButton.OK, MessageBoxImage.Error); Exception e = (Exception)args.ExceptionObject; SingleInstance <App> .Cleanup(); Current.Dispatcher.Invoke(new Action(() => { var box = new ErrorWindow(e); box.ShowDialog(); })); }
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs args) { Exception e = (Exception)args.ExceptionObject; // Ignore this native code exception. // Can't handle it, and it doesn't seem to have any negative effects. if (e.StackTrace.Contains(NATIVE_OVERLAPPED)) { return; } SingleInstance <App> .Cleanup(); Current.Dispatcher.Invoke(new Action(() => { var box = new ErrorWindow(e); box.ShowDialog(); })); }
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs args) { //MessageBox.Show("WiitarThing is about to crash. Press OK to show the crash message.", "Sorry", MessageBoxButton.OK, MessageBoxImage.Error); Exception e = (Exception)args.ExceptionObject; WiitarDebug.Log($"ERROR:\n----------------------------------------\n{e.ToString()}\n----------------------------------------", WiitarDebug.LogLevel.Error); var box = new ErrorWindow(e); box.ShowDialog(); SingleInstance <App> .Cleanup(); //Current.Dispatcher.Invoke(new Action(() => //{ // var box = new ErrorWindow(e); // box.ShowDialog(); //})); }