Add more info to comment range error (#213578)

Part of #213243
This commit is contained in:
Alex Ross
2024-05-28 01:05:18 -07:00
committed by GitHub
parent 7f55a08120
commit 02cb6f1c5b
@@ -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();
}