Skip to content

Commit

Permalink
Add placeholder for null data on OutputReceivedCallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Jun 13, 2022
1 parent b5897a4 commit ce8adfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ProcDumpDumper(IProcessHelper processHelper, IFileHelper fileHelper, IEnv
// Console.ForegroundColor = ConsoleColor.White;
// Log all standard output message of procdump in diag files.
// Otherwise they end up coming on console in pipleine.
EqtTrace.Info("ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: " + data);
EqtTrace.Info($"ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: {data ?? "<null>"}");

/// <inheritdoc/>
public void WaitForDumpToFinish()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public ProcessDumpUtility(IProcessHelper processHelper, IFileHelper fileHelper,
_crashDumperFactory = crashDumperFactory;
}

protected Action<object, string> OutputReceivedCallback => (process, data) =>
protected Action<object?, string?> OutputReceivedCallback => (process, data) =>
// Log all standard output message of procdump in diag files.
// Otherwise they end up coming on console in pipleine.
EqtTrace.Info("ProcessDumpUtility.OutputReceivedCallback: Output received from procdump process: " + data);
EqtTrace.Info($"ProcessDumpUtility.OutputReceivedCallback: Output received from procdump process: {data ?? "<null>"}");

/// <inheritdoc/>
public IEnumerable<string> GetDumpFiles(bool warnOnNoDumpFiles, bool processCrashed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public WindowsHangDumper(IProcessHelper processHelper, Action<string>? logWarnin
// Console.ForegroundColor = ConsoleColor.White;
// Log all standard output message of procdump in diag files.
// Otherwise they end up coming on console in pipleine.
EqtTrace.Info("ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: " + data);
EqtTrace.Info($"ProcDumpDumper.OutputReceivedCallback: Output received from procdump process: {data ?? "<null>"}");

public void Dump(int processId, string outputDirectory, DumpTypeOption type)
{
Expand Down

0 comments on commit ce8adfc

Please sign in to comment.