Skip to content

Make complexEdit command more robust#6325

Merged
genlu merged 2 commits intodotnet:mainfrom
genlu:LogUriError
Sep 11, 2023
Merged

Make complexEdit command more robust#6325
genlu merged 2 commits intodotnet:mainfrom
genlu:LogUriError

Conversation

@genlu
Copy link
Copy Markdown
Member

@genlu genlu commented Sep 9, 2023

... by checking both fsPath and path. Also added logging when there's error.

This is a follow-up on #6315, just in case of unexpected scenarios.

related to:
#6293
#6246

... by checking both fsPath and path. Also added logging when there's error.
throw new Error('Failed to make a complex text edit for completion.');
const componentName = '[roslyn.client.completionComplexEdit]';
const errorMessage = 'Failed to make a complex text edit for completion.';
outputChannel.show();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to consider here - should we put up a toast as well? We have utils for showing an error message. Should only do that though if we want to bring attention to it and don't think it will be popping up all the time.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, we probably can hook up the toast, given this is a failure from user explicitly invoked action. Will add in a follow up PR

@genlu genlu merged commit 03b58ea into dotnet:main Sep 11, 2023
@genlu genlu deleted the LogUriError branch September 11, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants