From 70bb55b35e35154bb36f43ef4ea64ccc1601bbc5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 11 Jan 2010 09:55:55 +0000 Subject: [PATCH] Handle Timeout::Error exceptions which are caught by ActiveRecord. --- config/initializers/abstract_adapter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/abstract_adapter.rb b/config/initializers/abstract_adapter.rb index 24d7c56e1..fbae428cb 100644 --- a/config/initializers/abstract_adapter.rb +++ b/config/initializers/abstract_adapter.rb @@ -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 -- 2.39.5