Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
Re-throw uglify parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
Psvensso committed Aug 19, 2015
1 parent d0a7843 commit 77500b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ function createOutput(outputs, outFile, outputPath, opts) {

function minify(output, fileName, mangle, globalDefs) {
var uglify = require('uglify-js');
var ast = uglify.parse(output.source, { filename: fileName });
var ast;
try{
ast = uglify.parse(output.source, { filename: fileName });
} catch(e){
throw new Error(e);
}
ast.figure_out_scope();

ast = ast.transform(uglify.Compressor({
dead_code: true,
global_defs: globalDefs,
Expand Down

0 comments on commit 77500b0

Please sign in to comment.