Skip to content

Commit 02391c9

Browse files
committed
refactor(utils): function stringRange trow better error message
1 parent c78e35d commit 02391c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function stringRange(str: string, start: string, end: string): string {
1212
let endPos = str.indexOf(end);
1313

1414
if (startPos === NOT_FOUND || endPos === NOT_FOUND)
15-
throw new Error('Search terms not found');
15+
throw new Error(`Search terms not found (${start} ${end})`);
1616

1717
return str.substring(str.indexOf(start) + start.length, str.indexOf(end));
1818
}

0 commit comments

Comments
 (0)