21 lines
719 B
C#
21 lines
719 B
C#
namespace Desktop
|
|
{
|
|
internal static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
Application.ThreadException += (s, e) =>
|
|
MessageBox.Show($"UI Thread Crash: {e.Exception.Message}\n\n{e.Exception.StackTrace}", "Fatal Error");
|
|
|
|
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
|
|
MessageBox.Show($"Background Crash: {((Exception)e.ExceptionObject).Message}\n\n{((Exception)e.ExceptionObject).StackTrace}", "Fatal Error");
|
|
|
|
ApplicationConfiguration.Initialize();
|
|
Application.Run(new Form1());
|
|
}
|
|
}
|
|
} |