Hi,

I'm doing this:

response = Net::HTTP.start(host).request_head('/')

To check a domain for its response. Now some of the domains checked
will not exist and thus produce the following error:

SocketError: getaddrinfo: Name or service not known

But I don't want my application to fail when this happens, I just want
the response to be nil. How can this be done?

Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to