Ejemplo n.º 1
0
        /// <summary>
        /// 处理应用程序域内的未处理异常(非UI线程异常)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Exception ex           = e.ExceptionObject as Exception;
            var       frmException = new FrmException(ex);

            frmException.ShowDialog();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 处理应用程序的未处理异常(UI线程异常)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            var frmException = new FrmException(e.Exception);

            frmException.ShowDialog();
        }