From 9fa4a113808122ab050b7582a8f0c82ece8b7847 Mon Sep 17 00:00:00 2001 From: Olivia Date: Tue, 25 Oct 2022 08:22:36 +1300 Subject: [PATCH] Fix the exception reporting in `ConvertFrom-StringData` (#18336) --- .../commands/utility/ConvertFrom-StringData.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs index 16bb4be012..284c344f7c 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs @@ -69,7 +69,7 @@ namespace Microsoft.PowerShell.Commands { throw PSTraceSource.NewInvalidOperationException( ConvertFromStringData.InvalidDataLine, - line); + s); } string name = s.Substring(0, index); @@ -79,7 +79,7 @@ namespace Microsoft.PowerShell.Commands { throw PSTraceSource.NewInvalidOperationException( ConvertFromStringData.DataItemAlreadyDefined, - line, + s, name); }