mirror of
https://github.com/ariya/phantomjs.git
synced 2024-09-11 04:46:09 +03:00
Netsniff.coffee example should exit with an error when fails to load the adress
Issue #11333 https://github.com/ariya/phantomjs/issues/11333
This commit is contained in:
parent
320608662d
commit
2f851086e4
@ -103,6 +103,7 @@ else
|
||||
page.open page.address, (status) ->
|
||||
if status isnt 'success'
|
||||
console.log 'FAIL to load the address'
|
||||
phantom.exit(1)
|
||||
else
|
||||
page.endTime = new Date()
|
||||
page.title = page.evaluate ->
|
||||
@ -110,4 +111,4 @@ else
|
||||
|
||||
har = createHAR page.address, page.title, page.startTime, page.resources
|
||||
console.log JSON.stringify har, undefined, 4
|
||||
phantom.exit()
|
||||
phantom.exit()
|
||||
|
Loading…
Reference in New Issue
Block a user