-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathApp.xaml.cs
36 lines (32 loc) · 1.07 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace ProverbTeleprompter
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
[STAThread]
protected override void OnStartup(StartupEventArgs e)
{
this.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);
base.OnStartup(e);
}
// [PreEmptive.Attributes.Teardown]
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
}
void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
MessageBox.Show(e.Exception.Message);
if(e.Exception.InnerException != null)
MessageBox.Show(e.Exception.InnerException.Message);
}
}
}