Skip to content

Commit 9fa4a11

Browse files
authored
Fix the exception reporting in ConvertFrom-StringData (#18336)
1 parent ece26bc commit 9fa4a11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected override void ProcessRecord()
6969
{
7070
throw PSTraceSource.NewInvalidOperationException(
7171
ConvertFromStringData.InvalidDataLine,
72-
line);
72+
s);
7373
}
7474

7575
string name = s.Substring(0, index);
@@ -79,7 +79,7 @@ protected override void ProcessRecord()
7979
{
8080
throw PSTraceSource.NewInvalidOperationException(
8181
ConvertFromStringData.DataItemAlreadyDefined,
82-
line,
82+
s,
8383
name);
8484
}
8585

0 commit comments

Comments
 (0)