Example #1
0
        private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            var ex = e.Exception;

            if (XmlContentErrorDialog.IsDbXmlError(ex) && XmlContentErrorDialog.HasOriginalXml(ex))
            {
                XmlContentErrorDialog.Show(ex);
            }
            else
            {
                ErrorDialog.Show(ex);
            }
        }
Example #2
0
        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            var ex = e.ExceptionObject as Exception;

            if (ex != null)
            {
                if (XmlContentErrorDialog.IsDbXmlError(ex) && XmlContentErrorDialog.HasOriginalXml(ex))
                {
                    XmlContentErrorDialog.Show(ex);
                }
                else
                {
                    ErrorDialog.Show(ex);
                }
            }
        }