예제 #1
0
        public static void UnhandledExceptionHandler(Exception e)
        {
            try
            {
                // Create Error Message
                string message = string.Format("An Application Error has occurred.\r\n\r\nEXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.Source, e.Message);
                if (e.InnerException != null)
                {
                    message += string.Format("\r\nINNER EXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.InnerException.Source, e.InnerException.Message);
                }
                message += string.Format("\r\nSTACK TRACE:\r\n{0}", e.StackTrace);

                FrmShowError fshow = new FrmShowError();
                fshow.settype(message);
                fshow.ShowDialog();
            }
            catch
            {
            }
        }
예제 #2
0
        public static void UnhandledExceptionHandler(string e1)
        {
            try
            {
                // Create Error Message
                string message = string.Format("An Application Error has occurred.\r\n\r\nEXCEPTION:\r\nMessage:");
                message += e1 + "\r\n";

                message += string.Format("\r\nSTACK TRACE:\r\n{0}", Environment.StackTrace);

                FrmShowError fshow = new FrmShowError();
                fshow.settype(message);
                fshow.ShowDialog();

                Environment.Exit(0);
            }
            catch
            {
                Environment.Exit(0);
            }
        }
예제 #3
0
        public static void UnhandledExceptionHandler(string e1)
        {
            try
            {
                // Create Error Message
                string message = string.Format("An Application Error has occurred.\r\n\r\nEXCEPTION:\r\nMessage:");
                message += e1 + "\r\n";

                message += string.Format("\r\nSTACK TRACE:\r\n{0}", Environment.StackTrace);

                FrmShowError fshow = new FrmShowError();
                fshow.settype(message);
                fshow.ShowDialog();

                Environment.Exit(0);
            }
            catch
            {
                Environment.Exit(0);
            }
        }
예제 #4
0
        public static void UnhandledExceptionHandler(Exception e)
        {
            try
            {
                // Create Error Message
                string message = string.Format("An Application Error has occurred.\r\n\r\nEXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.Source, e.Message);
                if (e.InnerException != null)
                {
                    message += string.Format("\r\nINNER EXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.InnerException.Source, e.InnerException.Message);
                }
                message += string.Format("\r\nSTACK TRACE:\r\n{0}", e.StackTrace);

                FrmShowError fshow = new FrmShowError();
                fshow.settype(message);
                fshow.ShowDialog();

            }
            catch
            {
            }
        }
예제 #5
0
        public static void UnhandledExceptionHandler(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            try
            {
                // Create Error Message
                string message = string.Format("An Application Error has occurred.\r\n\r\nEXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.Exception.Source, e.Exception.Message);
                if (e.Exception.InnerException != null)
                {
                    message += string.Format("\r\nINNER EXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.Exception.InnerException.Source, e.Exception.InnerException.Message);
                }
                message += string.Format("\r\nSTACK TRACE:\r\n{0}", e.Exception.StackTrace);

                FrmShowError fshow = new FrmShowError();
                fshow.settype(message);
                fshow.ShowDialog();

                Environment.Exit(0);
            }
            catch
            {
                Environment.Exit(0);
            }
        }
예제 #6
0
        public static void UnhandledExceptionHandler(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            try
            {
                // Create Error Message
                string message = string.Format("An Application Error has occurred.\r\n\r\nEXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.Exception.Source, e.Exception.Message);
                if (e.Exception.InnerException != null)
                {
                    message += string.Format("\r\nINNER EXCEPTION:\r\nSource: {0}\r\nMessage: {1}\r\n", e.Exception.InnerException.Source, e.Exception.InnerException.Message);
                }
                message += string.Format("\r\nSTACK TRACE:\r\n{0}", e.Exception.StackTrace);

                FrmShowError fshow = new FrmShowError();
                fshow.settype(message);
                fshow.ShowDialog();

                Environment.Exit(0);
            }
            catch
            {
                Environment.Exit(0);
            }
        }