Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/PowerShell/PowerShell.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivia <gigascratch@cuttlefish.fish>2022-10-24 22:22:36 +0300
committerGitHub <noreply@github.com>2022-10-24 22:22:36 +0300
commit9fa4a113808122ab050b7582a8f0c82ece8b7847 (patch)
tree3ba5c433107cfea9adf802206ff14567b0fa8d6c
parentece26bcf117b8a0583fa9dbde7f367f0b637caba (diff)
Fix the exception reporting in `ConvertFrom-StringData` (#18336)
-rw-r--r--src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs4
1 files 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);
}