Skip to content

Commit

Permalink
Add support for distinguishing UglifyJS errors from bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zaygraveyard committed Nov 16, 2017
1 parent d831a77 commit 5ec195a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/scripts/compilers/UglifyJSCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ UglifyJSCompiler.prototype.compileWithLib = function (file, emitter) {
});

if (result.error) {
triggerError(result.error.message + '\n' + JSON.stringify(result.error.defs));
if (result.error.stack) {
triggerError(result.error.stack + '\nThis is probably a bug in UglifyJS.');
} else {
triggerError(result.error.message + '\n' + JSON.stringify(result.error.defs));
}
return;
}

Expand Down

0 comments on commit 5ec195a

Please sign in to comment.