Skip to content

Commit

Permalink
Log exceptions observed during up-to-date checks
Browse files Browse the repository at this point in the history
Previously any exception seen during the up-to-date check would result in a build being scheduled, but no information being provided as to why that would happen.

By logging a message when an exception occurs, users can more easily make progress diagnosing the issue.

We also publish an "Exception" reason via telemetry, so we will be able to see how widespread such problems are.
  • Loading branch information
drewnoakes committed Oct 15, 2021
1 parent 967ad36 commit 7b2f182
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,10 @@ async Task<bool> IsUpToDateInternalAsync(UpToDateCheckConfiguredInput state, Dat
logger.UpToDate();
return true;
}
catch (Exception ex)
{
return logger.Fail("Exception", "Up-to-date check threw an exception. Not up-to-date. {0}", ex);
}
finally
{
logger.Verbose("Up to date check completed in {0:N1} ms", sw.Elapsed.TotalMilliseconds);
Expand Down

0 comments on commit 7b2f182

Please sign in to comment.