diff --git a/Src/PChecker/CheckerCore/Coverage/ActivityCoverageReporter.cs b/Src/PChecker/CheckerCore/Coverage/ActivityCoverageReporter.cs index c3874385a..e0b29a15c 100644 --- a/Src/PChecker/CheckerCore/Coverage/ActivityCoverageReporter.cs +++ b/Src/PChecker/CheckerCore/Coverage/ActivityCoverageReporter.cs @@ -53,7 +53,10 @@ public void EmitCoverageReport(string coverageFile) { using (var writer = new StreamWriter(coverageFile)) { - WriteCoverageText(writer); + if (CoverageInfo.CoverageGraph != null) + { + WriteCoverageText(writer); + } } } diff --git a/Src/PCompiler/PCommandLine/CommandLine.cs b/Src/PCompiler/PCommandLine/CommandLine.cs index 19a065140..5fc655fe0 100644 --- a/Src/PCompiler/PCommandLine/CommandLine.cs +++ b/Src/PCompiler/PCommandLine/CommandLine.cs @@ -125,7 +125,7 @@ private static void PrintException(Exception ex) lock (ConsoleLock) { Error.Report($"[Internal Error]:\n {ex.Message}\n"); - Error.Report("[PTool] unhandled exception: {0}: {1}", ex.GetType().ToString(), ex.Message); + Error.Report("[PTool] unhandled exception: {0}: {1}\n Stack Trace: {2}", ex.GetType().ToString(), ex.Message, ex.StackTrace); } }