diff options
author | Azul <azul@leap.se> | 2013-12-12 10:15:43 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-12-12 10:15:43 +0100 |
commit | 8fba6fae51e96ec3330896d107ab01fce2e322d9 (patch) | |
tree | cb6ff73ec9c58d308f4792b7e0869591b18fe269 /core | |
parent | e3b48ee60194b58c98cded485df4d936c5a4779d (diff) |
reraise with a better explaination on couch failure
Removing our own error class for this. It interferes with couch_rest_session_store tryign to catch the same errors.
Diffstat (limited to 'core')
-rw-r--r-- | core/lib/extensions/couchrest.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/lib/extensions/couchrest.rb b/core/lib/extensions/couchrest.rb index 84cfbb3..7450f59 100644 --- a/core/lib/extensions/couchrest.rb +++ b/core/lib/extensions/couchrest.rb @@ -23,10 +23,6 @@ module CouchRest end end - module Errors - class ConnectionFailed < CouchRestModelError; end - end - module Connection module ClassMethods @@ -36,7 +32,9 @@ module CouchRest rescue RestClient::Unauthorized, Errno::EHOSTUNREACH, Errno::ECONNREFUSED => e - raise CouchRest::Model::Errors::ConnectionFailed.new(e.to_s) + message = "Could not connect to couch database #{db} due to #{e.to_s}" + Rails.logger.warn message + raise e.class.new(message) end end |