mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Updated getRegExpMatch error message
This commit is contained in:
@@ -8,7 +8,7 @@ export function getRegExpMatch (str: string, regExp: RegExp, matchIndex: number
|
||||
const match: RegExpMatchArray | null = str.match(regExp);
|
||||
|
||||
if (!match) {
|
||||
throw new Error(`No matches were found for regular expression \`${regExp.toString()}\``);
|
||||
throw new Error(`No matches were found. String: \`${str}\`, regular expression: \`${regExp.toString()}\``);
|
||||
}
|
||||
|
||||
return (<RegExpMatchArray>match)[matchIndex + 1];
|
||||
|
||||
Reference in New Issue
Block a user