X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fphantom%2Fevaluate.js;h=8cc4c3e5bd1a906416552392cd0bbce21ae6e2c4;hb=704f3d76026568b3de75066def7cf8a7fd30af99;hp=ccf01e4822f545d2c1314185b158db63d73e8e78;hpb=92bb2814f6675fb16e7dfe0f9fe07400e7bcccee;p=mkws-moved-to-github.git diff --git a/test/phantom/evaluate.js b/test/phantom/evaluate.js index ccf01e4..8cc4c3e 100644 --- a/test/phantom/evaluate.js +++ b/test/phantom/evaluate.js @@ -76,12 +76,18 @@ page.onAlert = function (msg) { console.log("Alert: " + msg); }; +// display HTTP errors +page.onResourceError = function (resourceError) { + // console.log('phantomjs error code: ' + resourceError.errorCode); + console.log(resourceError.errorString); + phantom.exit(3); +}; page.open(url, function (status) { if (debug >= 1) console.log("fetch " + url + " with status: " + status); if (status != 'success') { - console.log("Failed to fetch page, give up"); + console.log("Failed to fetch page, give up. Network error?"); phantom.exit(1); }