Skip to content

Commit 07cf2ea

Browse files
JustinGroteCopilot
andauthored
Use HandlerErrorException to surface error to user
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 08f05cc commit 07cf2ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PowerShellEditorServices/Services/TextDocument/RenameService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ private TextEdit GetRenameVariableEdit(Ast ast)
483483
Range = new ScriptExtentAdapter(stringAst.Extent)
484484
},
485485
CommandParameterAst param => !IsValidCommandParameterName(NewName)
486-
? throw new Exception($"-{NewName} is not a valid command parameter name.")
486+
? throw new HandlerErrorException($"-{NewName} is not a valid command parameter name.")
487487
: new TextEdit
488488
{
489489
NewText = '-' + NewName,

0 commit comments

Comments
 (0)