예제 #1
0
 static void Main(string[] args)
 {
     UnhandledExceptionManager.AddHandler();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new Form1(args));
 }
예제 #2
0
        //--
        //-- converts exception to a formatted "more" string
        //--
        private static string ExceptionToMore(System.Exception objException)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            var _with2 = sb;

            if (_blnEmailError)
            {
                _with2.Append("Information about this problem was automatically mailed to ");
                _with2.Append(AppSettings.GetString("UnhandledExceptionManager/EmailTo"));
                _with2.Append(Environment.NewLine + Environment.NewLine);
            }
            _with2.Append("Detailed technical information follows: " + Environment.NewLine);
            _with2.Append("---" + Environment.NewLine);
            string x = UnhandledExceptionManager.ExceptionToString(objException);

            _with2.Append(x);
            return(sb.ToString());
        }
예제 #3
0
 //--
 //-- make sure "More" text is populated with something useful
 //--
 private static string GetDefaultMore(string strMoreDetails)
 {
     if (string.IsNullOrEmpty(strMoreDetails))
     {
         System.Text.StringBuilder objStringBuilder = new System.Text.StringBuilder();
         var _with1 = objStringBuilder;
         _with1.Append(_strDefaultMore);
         _with1.Append(Environment.NewLine);
         _with1.Append(Environment.NewLine);
         _with1.Append("Basic technical information follows: " + Environment.NewLine);
         _with1.Append("---" + Environment.NewLine);
         _with1.Append(UnhandledExceptionManager.SysInfoToString(true));
         return(objStringBuilder.ToString());
     }
     else
     {
         return(strMoreDetails);
     }
 }