From: "Peña, Botp" Date: 2008-09-11T17:01:26+09:00 Subject: Re: How to check if a webpage exists From: Davide Benini [mailto:nutsmuggler@hotmail.com] # ... # None of this works. # Which is the proper syntax? compare, > require 'open-uri' => false > begin * open "http://www.google.com", :proxy=>true > p "i'm ok" #<-- ok codes here > rescue > p "sorry can't do" #<-- not ok codes here > end "i'm ok" => nil > begin * open "http://this.does.not.exist.com", :proxy=>true > p "i'm ok" > rescue => e > p "sorry can't do" > p "error is: #{e}" > end "sorry can't do" "error is: 503 Service Unavailable" => nil