[Pkg-javascript-commits] [uglifyjs] 158/190: Catch errors when compression test fails to parse
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Aug 7 23:17:22 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 31d5825a86a6bcee91187b4a3962e0cd0f3b0d93
Author: Anthony Van de Gejuchte <anthonyvdgent at gmail.com>
Date: Wed Jun 8 20:11:32 2016 +0200
Catch errors when compression test fails to parse
---
test/run-tests.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/test/run-tests.js b/test/run-tests.js
index 0a249b9..6614b2a 100755
--- a/test/run-tests.js
+++ b/test/run-tests.js
@@ -159,9 +159,16 @@ function run_compress_tests() {
function parse_test(file) {
var script = fs.readFileSync(file, "utf8");
- var ast = U.parse(script, {
- filename: file
- });
+ // TODO try/catch can be removed after fixing https://github.com/mishoo/UglifyJS2/issues/348
+ try {
+ var ast = U.parse(script, {
+ filename: file
+ });
+ } catch (e) {
+ console.log("Caught error while parsing tests in " + file + "\n");
+ console.log(e);
+ throw e;
+ }
var tests = {};
var tw = new U.TreeWalker(function(node, descend){
if (node instanceof U.AST_LabeledStatement
--
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