aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-01-22 00:09:08 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-01-22 00:09:08 +0000
commit29938ba0f070ed38b6de482d62a90cfd105c340d (patch)
tree0ae9ab8f14367bdac40beaaa776559409ceae904 /activesupport
parent7701e6466dd5f6ca1b3eb1bfaf73f1d0723bb324 (diff)
downloadrails-29938ba0f070ed38b6de482d62a90cfd105c340d.tar.gz
rails-29938ba0f070ed38b6de482d62a90cfd105c340d.tar.bz2
rails-29938ba0f070ed38b6de482d62a90cfd105c340d.zip
Log an error to the console when the memcache server is raising
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache/mem_cache_store.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb
index 5820d15cc5..5f38c4f1ce 100644
--- a/activesupport/lib/active_support/cache/mem_cache_store.rb
+++ b/activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -15,21 +15,24 @@ module ActiveSupport
def read(key, options = nil)
super
@data.get(key, raw?(options))
- rescue MemCache::MemCacheError
+ rescue MemCache::MemCacheError => e
+ logger.error("MemCacheError (#{e}): #{e.message}")
nil
end
def write(key, value, options = nil)
super
@data.set(key, value, expires_in(options), raw?(options))
- rescue MemCache::MemCacheError
+ rescue MemCache::MemCacheError => e
+ logger.error("MemCacheError (#{e}): #{e.message}")
nil
end
def delete(key, options = nil)
super
@data.delete(key, expires_in(options))
- rescue MemCache::MemCacheError
+ rescue MemCache::MemCacheError => e
+ logger.error("MemCacheError (#{e}): #{e.message}")
nil
end