コード例 #1
0
        void ReportException(Exception e)
        {
#if NetCF
            try
            {
                var report = new FMSC.Utility.ErrorHandling.ErrorReport(e, System.Reflection.Assembly.GetExecutingAssembly());
                report.MakeErrorReport();
                MessageBox.Show(e.GetType().Name, "Error");
            }
            catch (Exception ex)
            {
                Debug.Fail(ex.Message);
            }
#else
            Crashes.TrackError(e);
#endif
        }
コード例 #2
0
        public void HandleException(Exception ex, string optMessage, bool isCritical, bool createErrorReport)
        {
            if (createErrorReport)
            {
#if NetCF
                FMSC.Utility.ErrorHandling.ErrorReport report = new FMSC.Utility.ErrorHandling.ErrorReport(ex, Assembly.GetCallingAssembly());
                report.MakeErrorReport();
#endif
            }

#if !NetCF
            Crashes.TrackError(ex);
#endif
            Trace.WriteLine("Error::" + ex.Message + "::" + optMessage);

            DialogService.ShowMessage(optMessage ?? ex.Message,
                                      (isCritical) ? "Error" : "Non-Critical Error");
        }
コード例 #3
0
        public void HandleException(Exception ex, string optMessage, bool isCritical, bool createErrorReport)
        {
            if (createErrorReport)
            {
                FMSC.Utility.ErrorHandling.ErrorReport report = new FMSC.Utility.ErrorHandling.ErrorReport(ex, Assembly.GetCallingAssembly());
                report.MakeErrorReport();
            }

            Logger.Log.E(ex);
            ViewController.ShowMessage(optMessage ?? ex.Message,
                (isCritical) ? "Error" : "Non-Critical Error",
                MessageBoxIcon.Asterisk);
        }