try catch capability

24 views
Skip to first unread message

Pranay Pramod

unread,
Mar 14, 2013, 4:31:32 PM3/14/13
to phan...@googlegroups.com

I am trying to process a list of URLs. The problem I am facing is that one of the URLs is failing to load. Consequently the entire script crashes and thus the processing for the rest of the list dies.

Precisely, this is the warning and the offending URL
[warning] [phantom] Loading resource failed with status=fail (HTTP 200): http:/webarchive.loc.gov/all/20060406002931/wristphotography.com/sendtofriend.php

Is there a way I can limit the damage using exception handling (try/catch) or something so that rest of the loop processing continues?

Many thanks for any suggestions.

Pranay.

James Greene

unread,
Mar 14, 2013, 4:37:37 PM3/14/13
to phan...@googlegroups.com
Can you share a Gist of your actual script file? Or, if it is small enough, you can just paste it into this thread directly.

Sincerely,
    James Greene




Pranay.

--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages