Skip to content

Commit

Permalink
Add more info to comment range error (#213578)
Browse files Browse the repository at this point in the history
Part of #213243
  • Loading branch information
alexr00 authored May 28, 2024
1 parent 7f55a08 commit 02cb6f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ export class CommentController implements IEditorContribution {
if (!newCommentInfos.length || !this.editor?.hasModel()) {
this._addInProgress = false;
if (!newCommentInfos.length) {
throw new Error('There are no commenting ranges at the current position.');
throw new Error(`There are no commenting ranges at the current position (${range ? 'with range' : 'without range'}).`);
}
return Promise.resolve();
}
Expand Down

0 comments on commit 02cb6f1

Please sign in to comment.