Skip to content

Commit

Permalink
Log error if Chromium could not be started
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed Sep 24, 2024
1 parent 04bd193 commit b02f5af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions League/Caching/ReportSheetCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,12 @@ private async Task<string> CreateReportSheetPdfChromium(string tempFolder, strin

if (proc is null)
{
//_logger.LogCritical("Process '{PathToChromium}' could not be started.", _pathToChromium);
throw new InvalidOperationException($"Process '{_pathToChromium}' could not be started.");
_logger.LogError("Process '{PathToChromium}' could not be started.", _pathToChromium);
}

const int timeout = 8000;
var timePassed = 0;
while (!proc.HasExited)
while (proc is { HasExited: false })
{
timePassed += 100;
await Task.Delay(100, default);
Expand All @@ -213,6 +212,7 @@ private async Task<string> CreateReportSheetPdfChromium(string tempFolder, strin
throw new OperationCanceledException($"Chromium timed out after {timeout}ms.");
}

// non-existing file is handled in MovePdfToCache
return pdfFile;
}

Expand Down

0 comments on commit b02f5af

Please sign in to comment.