Permalink
Browse files

Merge pull request #13617 from arthurnn/error_var

Add 'e' var on rescue DalliError, in order to log it
  • Loading branch information...
2 parents ca98d0d + f3748c8 commit 017b0fb08a221fe6b1bb73946c3e365daf80bb39 @rafaelfranca rafaelfranca committed Jan 6, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/cache/mem_cache_store.rb
View
4 activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -85,7 +85,7 @@ def increment(name, amount = 1, options = nil) # :nodoc:
instrument(:increment, name, :amount => amount) do
@data.incr(escape_key(namespaced_key(name, options)), amount)
end
- rescue Dalli::DalliError
+ rescue Dalli::DalliError => e
logger.error("DalliError (#{e}): #{e.message}") if logger
nil
end
@@ -99,7 +99,7 @@ def decrement(name, amount = 1, options = nil) # :nodoc:
instrument(:decrement, name, :amount => amount) do
@data.decr(escape_key(namespaced_key(name, options)), amount)
end
- rescue Dalli::DalliError
+ rescue Dalli::DalliError => e
logger.error("DalliError (#{e}): #{e.message}") if logger
nil
end

0 comments on commit 017b0fb

Please sign in to comment.