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); } }
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); } }