未验证 提交 72b31ae9 编写于 作者: S Sam Harwell 提交者: GitHub

Merge pull request #43352 from sharwell/failfast-nre

Fix NullReferenceException in FailFast handling
......@@ -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;
}
}
......
......@@ -100,7 +100,7 @@ private SqlConnection(sqlite3 handle, IPersistentStorageFaultInjector faultInjec
{
var ex = new InvalidOperationException("SqlConnection was not properly closed");
_faultInjector?.OnFatalError(ex);
FatalError.Report(new InvalidOperationException("SqlConnection was not properly closed"));
FatalError.Report(ex);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册