Example #1
0
 public override void Draw(float t)
 {
     base.Draw(t);
     try
     {
         doCommandModule();
         errorCount = 0;
     }
     catch (Exception ex)
     {
         ++errorCount;
         if (errorCount >= 3)
         {
             if (!hasSentErrorEmail)
             {
                 Utils.SendThreadedErrorReport(ex, "Display module Crash: " + command, DebugLog.GetDump());
                 hasSentErrorEmail = true;
             }
             command        = "connect";
             commandArgs    = new string[1];
             commandArgs[0] = "connect";
             errorCount     = 0;
         }
         else
         {
             DebugLog.add(Utils.GenerateReportFromException(ex));
         }
     }
 }
Example #2
0
 public override void Draw(float t)
 {
     base.Draw(t);
     try
     {
         this.doCommandModule();
         this.errorCount = 0;
     }
     catch (Exception ex)
     {
         string reportFromException = Utils.GenerateReportFromException(ex);
         Console.WriteLine(reportFromException);
         if (OS.DEBUG_COMMANDS)
         {
             this.os.write("ERROR RENDERING DAEMON: " + this.command);
             this.os.write(Utils.GenerateReportFromExceptionCompact(ex));
         }
         ++this.errorCount;
         if (this.errorCount >= 3)
         {
             if (!this.hasSentErrorEmail)
             {
                 Utils.SendThreadedErrorReport(ex, LocaleTerms.Loc("Display module Crash: ") + this.command, DebugLog.GetDump());
                 this.hasSentErrorEmail = true;
             }
             this.command        = "connect";
             this.commandArgs    = new string[1];
             this.commandArgs[0] = "connect";
             this.errorCount     = 0;
         }
         else
         {
             Utils.AppendToErrorFile(reportFromException);
         }
     }
 }