you want

begin
browser.goto(site_url)
rescue Timeout::Error
#do something
end

-- 
Posted via http://www.ruby-forum.com/.