Skip to content

Commit 012673b

Browse files
authored
Merge pull request #29 from AsBuiltReport/copilot/sub-pr-28
Fix New-SignalChart to throw terminating error when Values is null
2 parents 73d35a5 + f574829 commit 012673b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Sources/PowerShell/SignalChartPwsh.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ protected override void ProcessRecord()
271271
}
272272
else
273273
{
274-
WriteObject("Values parameter cannot be null or empty.");
274+
ThrowTerminatingError(new ErrorRecord(
275+
new ArgumentNullException(nameof(Values), "Values parameter cannot be null or empty."),
276+
"ValuesNullOrEmpty",
277+
ErrorCategory.InvalidArgument,
278+
nameof(Values)));
275279
}
276280
}
277281
}

0 commit comments

Comments
 (0)