From 92ea1fea8ae56099c015dd73909a96a33e09b2ce Mon Sep 17 00:00:00 2001 From: Joe Schmitt <1146681+schmittjoseph@users.noreply.github.com> Date: Tue, 21 May 2024 11:22:06 -0700 Subject: [PATCH] Fix ErrorMessage_CouldNotMapToAction (#6665) --- .../dotnet-monitor/CollectionRules/ActionListExecutor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Tools/dotnet-monitor/CollectionRules/ActionListExecutor.cs b/src/Tools/dotnet-monitor/CollectionRules/ActionListExecutor.cs index 7e226657508..8c3d5d4823c 100644 --- a/src/Tools/dotnet-monitor/CollectionRules/ActionListExecutor.cs +++ b/src/Tools/dotnet-monitor/CollectionRules/ActionListExecutor.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; +using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -83,7 +84,11 @@ public async Task> ExecuteAction if (!_actionOperations.TryCreateFactory(actionOption.Type, out factory)) { - throw new InvalidOperationException(Strings.ErrorMessage_CouldNotMapToAction); + throw new InvalidOperationException(string.Format( + CultureInfo.InvariantCulture, + Strings.ErrorMessage_CouldNotMapToAction, + actionOption.Type + )); } object newSettings = dependencyAnalyzer.SubstituteOptionValues(actionResults, actionIndex, actionOption.Settings);