Skip to content

Commit 664b264

Browse files
JustinGroteCopilot
andauthored
Use HandleErrorException to display to the client
Co-authored-by: Copilot <[email protected]>
1 parent ec821a1 commit 664b264

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
@@ -477,7 +477,7 @@ private TextEdit GetRenameVariableEdit(Ast ast)
477477
Range = new ScriptExtentAdapter(var.Extent)
478478
},
479479
StringConstantExpressionAst stringAst => !IsValidVariableName(NewName)
480-
? throw new Exception($"{NewName} is not a valid variable name.")
480+
? throw new HandlerErrorException($"{NewName} is not a valid variable name.")
481481
: new TextEdit
482482
{
483483
NewText = NewName,

0 commit comments

Comments
 (0)