From 6e4d9d8532939a683168e59b0620d4c2b1e33621 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 20 Dec 2024 16:36:54 -0700 Subject: [PATCH] capture and report analyzer failures (#11167) --- .../NuGetUpdater.Core/Analyze/AnalyzeWorker.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs index 3918567fca..a560cbad94 100644 --- a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs +++ b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/AnalyzeWorker.cs @@ -62,6 +62,17 @@ internal async Task RunWithErrorHandlingAsync(string repoRoot, s UpdatedDependencies = [], }; } + catch (Exception ex) + { + analysisResult = new AnalysisResult + { + ErrorType = ErrorType.Unknown, + ErrorDetails = ex.ToString(), + UpdatedVersion = string.Empty, + CanUpdate = false, + UpdatedDependencies = [], + }; + } return analysisResult; }