Commit e21335d5 e21335d585867a5132c68d4913212df0f71d4dd7 by Nicolas Perriault

better logging messages

1 parent 9ca9c9e8
...@@ -580,7 +580,12 @@ ...@@ -580,7 +580,12 @@
580 }; 580 };
581 page.onLoadFinished = function(status) { 581 page.onLoadFinished = function(status) {
582 if (status !== "success") { 582 if (status !== "success") {
583 casper.log('Loading resource failed with status=' + status + ': ' + casper.requestUrl, "info"); 583 var message = 'Loading resource failed with status=' + status;
584 if (casper.currentHTTPStatus) {
585 message += ' (HTTP ' + casper.currentHTTPStatus + ')';
586 }
587 message += ': ' + casper.requestUrl;
588 casper.log(message, "warning");
584 } 589 }
585 if (casper.options.clientScripts) { 590 if (casper.options.clientScripts) {
586 for (var i = 0; i < casper.options.clientScripts.length; i++) { 591 for (var i = 0; i < casper.options.clientScripts.length; i++) {
......