C
Carl Youngblood
I'm trying to rescue a TimeoutError in Net::HTTP's get and post methods,
but it's not working. I noticed some postings about how the rescue
catch-all didn't work any more for TimeoutErrors, but I can't even
explicitly rescue this error. I know the page is available and that
retrying will work, in this case, and all I want is a quick and dirty
way of scraping some web pages, but this error brings down my script.
Here's my code:
begin
resp, data = h.post('/tsd_listings/tsd_search.fpl', postdata, headers)
rescue TimeoutError => e
retry
end
Thanks in advance for your help.
Carl Youngblood
P.S. I'm using Ruby 1.8.0
but it's not working. I noticed some postings about how the rescue
catch-all didn't work any more for TimeoutErrors, but I can't even
explicitly rescue this error. I know the page is available and that
retrying will work, in this case, and all I want is a quick and dirty
way of scraping some web pages, but this error brings down my script.
Here's my code:
begin
resp, data = h.post('/tsd_listings/tsd_search.fpl', postdata, headers)
rescue TimeoutError => e
retry
end
Thanks in advance for your help.
Carl Youngblood
P.S. I'm using Ruby 1.8.0