Skip to content

Commit

Permalink
Fixes a null pointer exception reported by the PChecker (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushdesai committed Apr 3, 2024
1 parent bec256f commit 59e3312
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public void EmitCoverageReport(string coverageFile)
{
using (var writer = new StreamWriter(coverageFile))
{
WriteCoverageText(writer);
if (CoverageInfo.CoverageGraph != null)
{
WriteCoverageText(writer);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Src/PCompiler/PCommandLine/CommandLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private static void PrintException(Exception ex)
lock (ConsoleLock)
{
Error.Report($"[Internal Error]:\n {ex.Message}\n<Please report to the P team or create an issue on GitHub, Thanks!>");
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);
}
}

Expand Down

0 comments on commit 59e3312

Please sign in to comment.