Skip to content
Browse files

Merge of patch from atesgoral to trigger error exit code so other too…

…ls will properly stop on a minification error in Closure Compiler.
  • Loading branch information...
1 parent 36810cf commit 72d2840fa56b1651f15f4331982b01257dfdabd6 @jrburke jrburke committed Apr 19, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 build/jslib/rhino/optimize.js
View
7 build/jslib/rhino/optimize.js
@@ -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.
Something went wrong with that request. Please try again.