示例#1
0
 public void RunDiagnostics2()
 {
     try
     {
         DiagnosticDevice.Start();
         DiagnosticDevice.Run();
         Console.WriteLine(DiagnosticDevice.Results());
     }
     catch (DiagnosticsException e) {
         var errMsg = FormattedErrorMessage(e, Module, System);
         Log(errMsg);
         throw new ApplicationException(errMsg, e);
     }
 }
示例#2
0
 public void RunDiagnostics()
 {
     try
     {
         DiagnosticDevice.Start();
         DiagnosticDevice.Run();
         Console.WriteLine(DiagnosticDevice.Results());
     }
     catch (DiagnosticsException e) {
         var errMsg = $"{DateTime.Now}: {System}-{Module} " +
                      $"{LogLevel.Error} {e.Message.Trunc(80)}";
         Log(errMsg);
         throw new ApplicationException(errMsg, e);
     }
 }