From fa2a52c5d247d9ef5a7deedba7a7e1624819730c Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 20 Dec 2024 16:15:12 -0700 Subject: [PATCH] capture and report analyzer failures --- .../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; }