Skip to content

Commit

Permalink
Use Error object instead of simple string message
Browse files Browse the repository at this point in the history
Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
  • Loading branch information
vzhukovs committed Apr 17, 2020
1 parent ebf7b78 commit 2c244ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2c244ad

Please sign in to comment.