initial commit
This commit is contained in:
45
Project/Program.cs
Normal file
45
Project/Program.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Project
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 해당 응용 프로그램의 주 진입점입니다.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
|
||||
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
|
||||
Application.Run(new fMain());
|
||||
}
|
||||
|
||||
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
string emsg = "Fatal Error(UHE)\n\n" + e.ExceptionObject.ToString();
|
||||
Pub.log.AddE(emsg);
|
||||
Pub.log.Flush();
|
||||
Util.SaveBugReport(emsg);
|
||||
var f = new fErrorException(emsg);
|
||||
f.ShowDialog();
|
||||
Application.ExitThread();
|
||||
}
|
||||
|
||||
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
||||
{
|
||||
string emsg = "Fatal Error(ATE)\n\n" + e.Exception.ToString();
|
||||
Pub.log.AddE(emsg);
|
||||
Pub.log.Flush();
|
||||
Util.SaveBugReport(emsg);
|
||||
var f = new fErrorException(emsg);
|
||||
f.ShowDialog();
|
||||
Application.ExitThread();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user