Skip to content

Commit

Permalink
Merge pull request #13617 from arthurnn/error_var
Browse files Browse the repository at this point in the history
Add 'e' var on rescue DalliError, in order to log it
  • Loading branch information
rafaelfranca committed Jan 6, 2014
1 parent 7678ab6 commit bfbf8ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/cache/mem_cache_store.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def increment(name, amount = 1, options = nil) # :nodoc:
instrument(:increment, name, :amount => amount) do instrument(:increment, name, :amount => amount) do
@data.incr(escape_key(namespaced_key(name, options)), amount) @data.incr(escape_key(namespaced_key(name, options)), amount)
end end
rescue Dalli::DalliError rescue Dalli::DalliError => e
logger.error("DalliError (#{e}): #{e.message}") if logger logger.error("DalliError (#{e}): #{e.message}") if logger
nil nil
end end
Expand All @@ -101,7 +101,7 @@ def decrement(name, amount = 1, options = nil) # :nodoc:
instrument(:decrement, name, :amount => amount) do instrument(:decrement, name, :amount => amount) do
@data.decr(escape_key(namespaced_key(name, options)), amount) @data.decr(escape_key(namespaced_key(name, options)), amount)
end end
rescue Dalli::DalliError rescue Dalli::DalliError => e
logger.error("DalliError (#{e}): #{e.message}") if logger logger.error("DalliError (#{e}): #{e.message}") if logger
nil nil
end end
Expand Down

0 comments on commit bfbf8ab

Please sign in to comment.