From 12d4190e4831c768e03c768183311c70de2c48f0 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 27 May 2024 17:20:30 +0200 Subject: [PATCH] Add more info to comment range error Part of #213243 --- src/vs/workbench/contrib/comments/browser/commentsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentsController.ts b/src/vs/workbench/contrib/comments/browser/commentsController.ts index 5ba6ca59e0407..d679c22342370 100644 --- a/src/vs/workbench/contrib/comments/browser/commentsController.ts +++ b/src/vs/workbench/contrib/comments/browser/commentsController.ts @@ -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(); }