Printing out exceptions so that CLI users can see the error message and location details
This commit is contained in:
parent
b1febde3e9
commit
fefcd738e3
16
bin/uglifyjs
16
bin/uglifyjs
|
|
@ -244,11 +244,17 @@ async.eachLimit(files, 1, function (file, cb) {
|
|||
});
|
||||
}
|
||||
else {
|
||||
TOPLEVEL = UglifyJS.parse(code, {
|
||||
filename : file,
|
||||
toplevel : TOPLEVEL,
|
||||
expression : ARGS.expr,
|
||||
});
|
||||
try {
|
||||
TOPLEVEL = UglifyJS.parse(code, {
|
||||
filename : file,
|
||||
toplevel : TOPLEVEL,
|
||||
expression : ARGS.expr,
|
||||
});
|
||||
}
|
||||
catch (ex) {
|
||||
sys.error("ERROR: " + ex);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
});
|
||||
cb();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user