Skip to content

Commit

Permalink
Merge of patch from atesgoral to trigger error exit code so other too…
Browse files Browse the repository at this point in the history
…ls will properly stop on a minification error in Closure Compiler.
  • Loading branch information
jrburke committed Apr 20, 2011
1 parent 36810cf commit 72d2840
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build/jslib/rhino/optimize.js
Expand Up @@ -83,10 +83,13 @@ define(['logger'], function (logger) {
//Trigger the compiler
Compiler.setLoggingLevel(Packages.java.util.logging.Level[config.loggingLevel || 'WARNING']);
compiler = new Compiler();
compiler.compile(externSourceFile, jsSourceFile, options);
var result = compiler.compile(externSourceFile, jsSourceFile, options);
if (!result.success) {
throw new Error("Closure Compiler compilation failed");
}
return compiler.toSource();
}
};

return optimize;
});
});

0 comments on commit 72d2840

Please sign in to comment.