Skip to content

Commit

Permalink
make all tests work on Ruby 1.9.1.
Browse files Browse the repository at this point in the history
Timeout::Error is subclass of RuntimeError not SignalException
on Ruby 1.9.1.
  • Loading branch information
kou authored and chowells79 committed Jul 20, 2010
1 parent affbf7c commit 7f0ea1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/openid/fetchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ def fetch(url, body=nil, headers=nil, redirect_limit=REDIRECT_LIMIT)
conn.request_post(url.request_uri, body, headers)
end
}
rescue Timeout::Error => why
raise FetchingError, "Error fetching #{url}: #{why}"
rescue RuntimeError => why
raise why
rescue OpenSSL::SSL::SSLError => why
raise SSLFetchingError, "Error connecting to SSL URL #{url}: #{why}"
rescue FetchingError => why
raise why
rescue Exception => why
# Things we've caught here include a Timeout::Error, which descends
# from SignalException.
raise FetchingError, "Error fetching #{url}: #{why}"
end

Expand Down

0 comments on commit 7f0ea1d

Please sign in to comment.