diff --git a/packages/plugin-ext/src/plugin/languages/selection-range.ts b/packages/plugin-ext/src/plugin/languages/selection-range.ts index 6d469570bd9e1..6f668b5c8d5df 100644 --- a/packages/plugin-ext/src/plugin/languages/selection-range.ts +++ b/packages/plugin-ext/src/plugin/languages/selection-range.ts @@ -63,7 +63,7 @@ export class SelectionRangeProviderAdapter { while (true) { if (!selectionRange.range.contains(last)) { - return Promise.reject('INVALID selection range, must contain the previous range'); + return Promise.reject(new Error('INVALID selection range, must contain the previous range')); } oneResult.push(Converter.fromSelectionRange(selectionRange)); if (!selectionRange.parent) {