Skip to content

Commit

Permalink
Fix NullReferenceException in FailFast handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Apr 14, 2020
1 parent a6289eb commit 16d8875
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Compilers/Core/Portable/InternalUtilities/FailFast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ internal static void DumpStackTrace(Exception? exception = null, string? message
if (exception is object)
{
Console.WriteLine("Exception info");
for (Exception? current = exception; current is object; current = current!.InnerException)
for (Exception? current = exception; current is object; current = current.InnerException)
{
Console.WriteLine(current.Message);
Console.WriteLine(current.StackTrace);
current = current.InnerException;
}
}

Expand Down

0 comments on commit 16d8875

Please sign in to comment.