From 7757c35ceb0f6de52945fc7fef471ae1194b84ae Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Thu, 14 May 2015 12:27:56 -0700 Subject: [PATCH] Re-use the caught exception's error message in the parse error call. --- lib/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parse.js b/lib/parse.js index b6645f49..a4b121c3 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -484,7 +484,7 @@ function tokenizer($TEXT, filename, html5_comments) { try { r = new RegExp(regexp, mods); } catch(e) { - parse_error("Invalid regular expression"); + parse_error(e.message); } return token("regexp", r); });