16 |
|
[STAThread] |
17 |
|
static void Main() |
18 |
|
{ |
19 |
< |
AppDomain currentDomain = AppDomain.CurrentDomain; |
20 |
< |
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
21 |
< |
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException, true); |
22 |
< |
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); |
19 |
> |
using (log4net.NDC.Push("Code executed from ATSAdmin.exe")) |
20 |
> |
{ |
21 |
> |
AppDomain currentDomain = AppDomain.CurrentDomain; |
22 |
> |
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
23 |
> |
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException, true); |
24 |
> |
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); |
25 |
|
|
26 |
< |
Application.EnableVisualStyles(); |
27 |
< |
Application.SetCompatibleTextRenderingDefault(false); |
28 |
< |
Application.Run(new frmAdmin()); |
26 |
> |
Application.EnableVisualStyles(); |
27 |
> |
Application.SetCompatibleTextRenderingDefault(false); |
28 |
> |
Application.Run(new frmAdmin()); |
29 |
> |
} |
30 |
|
} |
31 |
|
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) |
32 |
|
{ |