Fix the exception reporting in ConvertFrom-StringData (#18336)

This commit is contained in:
Olivia
2022-10-24 12:22:36 -07:00
committed by GitHub
parent ece26bcf11
commit 9fa4a11380
@@ -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);
}