Explorar o código

Fix error 252 console output when there is a timeout while using the CLI

Gaël Métais %!s(int64=9) %!d(string=hai) anos
pai
achega
531d125dcc
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      lib/tools/phantomas/phantomasWrapper.js

+ 5 - 0
lib/tools/phantomas/phantomasWrapper.js

@@ -151,6 +151,11 @@ var PhantomasWrapper = function() {
                 }
                 }
 
 
                 cb(errorCode, json);
                 cb(errorCode, json);
+            
+            }).fail(function() {
+                // This function is useless, but the failing promise needs to be handled,
+                // otherwise the module meow writes in the console in case of a timeout (error code 252).
+                debug('Failing promise handled');
             });
             });
             
             
             phantomasPid = process.pid;
             phantomasPid = process.pid;