public static void HandleUncaughtException(Exception e, bool fatal) { // Create an error report. BugReport report = new BugReport { FogBugzUrl = "https://philltest.fogbugz.com/ScoutSubmit.asp", UserName = "******", Project = "BugzScoutSharp", Area = "Reports", DefaultMessage = DEFAULT_BUGZSCOUT_MESSAGE, }; if (fatal) { report.Description += "\n*** FATAL ERROR ***\n"; } report.AddMachineDetails("\nDiscovered by"); report.AddExceptionDetails(e); report.Description += "Application version: " + Util.GetProgramVersion( ) + " (built on " + Util.GetProgramBuildDate( ).ToShortDateString( ) + ")" + Environment.NewLine; report.Description += "OS: " + Util.GetWindowsVersion( ) + Environment.NewLine; // Show the error form with the report. ErrorForm form = new ErrorForm(e, report, fatal); form.ShowDialog( ); }
private void sendFeedbackWorker_DoWork(object sender, DoWorkEventArgs e) { BugReport report = new BugReport { FogBugzUrl = "https://philltest.fogbugz.com/ScoutSubmit.asp", UserName = "******", Title = "User feedback", Project = "BugzScoutSharp", Area = "Feedback", DefaultMessage = ErrorHandler.DEFAULT_BUGZSCOUT_MESSAGE, }; report.AddMachineDetails("Feedback sent by"); report.Description += Environment.NewLine + tbFeedback.Text; e.Result = report.Submit( ); }
/// <summary> /// Creates an error report for the given exception, suitable for sending to FogBugz. /// </summary> /// <param name="fatal">Can the program execution continue after this exception?</param> public static BugReport CreateReportForException( Exception e, bool fatal ) { // Create an error report. BugReport report = new BugReport { FogBugzUrl = "https://phillco.fogbugz.com/ScoutSubmit.asp", UserName = "******", Project = "LANdrop", Area = "Crash Reports", DefaultMessage = DEFAULT_BUGZSCOUT_MESSAGE, }; if ( fatal ) report.Description += "\n*** FATAL ERROR ***\n"; report.AddMachineDetails( "\nDiscovered by" ); report.AddExceptionDetails( e ); report.Description += "Application version: " + Util.GetProgramVersion( ) + Environment.NewLine; report.Description += "OS: " + Util.GetWindowsVersion( ) + Environment.NewLine; return report; }