From 02e58c23b81bc90fed8eaaac7fb5d040eaeab8e3 Mon Sep 17 00:00:00 2001 From: Elbert Alias Date: Sun, 29 Mar 2015 09:28:37 +1100 Subject: [PATCH] Fixed error handling in PhantomJS driver --- src/drivers/phantomjs/driver.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drivers/phantomjs/driver.js b/src/drivers/phantomjs/driver.js index c76fc6002..c2303bd46 100644 --- a/src/drivers/phantomjs/driver.js +++ b/src/drivers/phantomjs/driver.js @@ -99,12 +99,16 @@ page.onError = function(message) { wappalyzer.log(message, 'error'); + console.log('{}'); + phantom.exit(1); }; page.onResourceTimeout = function() { wappalyzer.log('Resource timeout', 'error'); + console.log('{}'); + phantom.exit(1); }; @@ -167,6 +171,8 @@ } catch ( e ) { wappalyzer.log(e, 'error'); + console.log('{}'); + phantom.exit(1); } })();