aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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