From: Robert Klemme Date: 2009-10-02T15:00:05+09:00 Subject: Re: socket error handling... Net http On 10/02/2009 04:01 AM, Bigmac Turdsplash wrote: > loop { > res = > Net::HTTP.get_response(URI.parse('http://bigmac.t35.com/text.txt')) > print res.body > sleep 3 > } > > > this loop brakes when i get the (SocketError)... i get errors because of > bad connection to my wireless network... i dont know how to handle this > error and keep the script from crashing... I suggest you read about Ruby's exception handling mechanisms. For a start please look here: http://ruby-doc.org/docs/ProgrammingRuby/ Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/