Skip to content
Browse files

Merge pull request #13617 from arthurnn/error_var

Add 'e' var on rescue DalliError, in order to log it
  • Loading branch information...
1 parent 7678ab6 commit bfbf8ab1b277632ae4b19fcfd602e9575534073c @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
@@ -87,7 +87,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
@@ -101,7 +101,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 bfbf8ab

Please sign in to comment.
Something went wrong with that request. Please try again.