Ejemplo n.º 1
0
        void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            //try
            //{
            GenerateReport(e.ExceptionObject, 1);

            ProcessStartInfo psi = new ProcessStartInfo();

            psi.FileName = "CrashReporter.exe";
            Process p = Process.GetCurrentProcess();
            //psi.Arguments = p.ProcessName + " " + "\"" + e.ExceptionObject.ToString() + "\"";
            string user_information = File_Help.get_userInformation_inLicense(Task.pFind_license);

            psi.Arguments = p.ProcessName + " pBuild " + "CrashReportLog.txt " + user_information;
            Process.Start(psi);

            if (e.IsTerminating)
            {
                Environment.Exit(0);
            }
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show("UnhandledException: " + ex.ToString());
            //}
        }
Ejemplo n.º 2
0
        void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            //try
            //{
            GenerateReport(e.Exception, 0);
            ProcessStartInfo psi = new ProcessStartInfo();

            psi.FileName = "CrashReporter.exe";
            Process p = Process.GetCurrentProcess();
            // psi.Arguments = p.ProcessName + " " + "\"" + e.Exception.ToString() + "\"";
            string user_information = File_Help.get_userInformation_inLicense(Task.pFind_license);

            psi.Arguments = p.ProcessName + " pBuild " + "CrashReportLog.txt " + user_information;
            Process.Start(psi);
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show("ThreadException: " + ex.ToString());
            //}
        }