Skip to content

Commit

Permalink
more friendly error message when first_reponse is null
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed Nov 28, 2015
1 parent d49605d commit 43591a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyspider/fetcher/phantomjs_fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ if (system.args.length !== 2) {
}

function _make_result(page) {
if (first_response === null) {
throw "No response received!";
}

var cookies = {};
page.cookies.forEach(function(e) {
cookies[e.name] = e.value;
Expand Down

0 comments on commit 43591a0

Please sign in to comment.