Handle Timeout::Error exceptions which are caught by ActiveRecord.

This commit is contained in:
Tom Hughes 2010-01-11 09:55:55 +00:00
parent 841ebe80d7
commit 70bb55b35e

View file

@ -15,6 +15,8 @@ module ActiveRecord
rescue ActiveRecord::StatementInvalid => ex
if ex.message =~ /^OSM::APITimeoutError: /
raise OSM::APITimeoutError.new
elsif ex.message =~ /^Timeout::Error: /
raise Timeout::Error.new
else
raise
end