1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-23 22:22:59 +02:00

"Widened" error handling. :-)

This commit is contained in:
Hauke Stange
2014-02-10 15:30:00 +01:00
parent 5930298b89
commit 7810d4a445

View File

@@ -68,7 +68,12 @@ class Minify_FastClosureCompiler {
// broke the connection and returns 227 instead of 0
// We'll just handle this here instead of fixing
// the nailgun client itself.
if ($result_code != 0 && $result_code != 227) {
//
// It also sometimes breaks on 229 on the devbox.
// To complete this whole madness and made future
// 'fixes' easier I added this nice little array...
$allowed_result_codes = array(0, 227, 229);
if (!in_array($result_code, $allowed_result_codes)) {
throw new Exception('Minify_FastClosureCompiler : Closure Compiler execution failed.');
}