static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { FormSplash.CloseSplash(); if (e.Exception is ExceptionIgnore) { } else { MessageBox.Show(FormExceptionText(e.Exception), "Application Thread Exception"); } }
static void Main() { try { #if USECEF string cachePath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "WebCache"); LimnorStudioPresenter.Init(cachePath); #endif Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FormSplash.ShowSplash(); Application.Run(new LimnorVOBMain()); } catch (Exception err) { FormSplash.CloseSplash(); MessageBox.Show(FormExceptionText(err), "Exception in Main"); } }