Re-use the caught exception's error message in the parse error call.
This commit is contained in:
parent
74c714bce9
commit
7757c35ceb
|
|
@ -484,7 +484,7 @@ function tokenizer($TEXT, filename, html5_comments) {
|
||||||
try {
|
try {
|
||||||
r = new RegExp(regexp, mods);
|
r = new RegExp(regexp, mods);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
parse_error("Invalid regular expression");
|
parse_error(e.message);
|
||||||
}
|
}
|
||||||
return token("regexp", r);
|
return token("regexp", r);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user