Topic: How to test / prevent errors for TimeOut
i have this line of code in a Def
xml_data = Net::HTTP.get_response(URI.parse(feed_url)).body
If this times out it causes a fatal error.
/home/ssg/.gem/ruby/1.8/gems/rails-2.3.8/lib/commands/runner.rb:48: /usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired (Timeout::Error)
How can i Catch this so if it does time out, its not a fatal error?