[Pkg-javascript-commits] [uglifyjs] 06/190: Re-use the caught exception's error message in the parse error call.

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Aug 7 23:17:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.

commit 9854deb626874f06107db196b87afcf2dc49b035
Author: Chris Cowan <agentme49 at gmail.com>
Date:   Thu May 14 12:27:56 2015 -0700

    Re-use the caught exception's error message in the parse error call.
---
 lib/parse.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/parse.js b/lib/parse.js
index 70ee2e8..ab72ad2 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -480,13 +480,11 @@ function tokenizer($TEXT, filename, html5_comments) {
             regexp += ch;
         }
         var mods = read_name();
-        var r;
         try {
-          r = new RegExp(regexp, mods);
+          return token("regexp", new RegExp(regexp, mods));
         } catch(e) {
-          parse_error("Invalid regular expression");
+          parse_error(e.message);
         }
-        return token("regexp", r);
     });
 
     function read_operator(prefix) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list