Beispiel #1
0
        // handles the exception event for the ui thread
        static void OnThreadException(object sender, System.Threading.ThreadExceptionEventArgs t)
        {
            StringBuilder ex = new StringBuilder();

            ex.AppendLine(t.Exception.Message);
            ex.AppendLine(t.Exception.StackTrace);

            if (t.Exception.InnerException != null)
            {
                ex.AppendLine("\n\nInnerException" + t.Exception.InnerException.Message);
                ex.AppendLine(t.Exception.InnerException.StackTrace);
            }

            JcwMessageBox.Show("OnThreadException: " + ex.ToString(), "Error");
        }
Beispiel #2
0
 // handles the exception event for all non ui threads
 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     JcwMessageBox.Show("CurrentDomain_UnhandledException: " + e.ExceptionObject.ToString(), "Error");
 }