1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make sure MemCacheStore logger exists

This commit is contained in:
Joshua Peek 2010-04-07 15:07:40 -05:00
parent d18ff1b7ef
commit eed89e65b6

View file

@ -64,7 +64,7 @@ module ActiveSupport
@data.get(key, raw?(options))
end
rescue MemCache::MemCacheError => e
logger.error("MemCacheError (#{e}): #{e.message}")
logger.error("MemCacheError (#{e}): #{e.message}") if logger
nil
end
@ -85,7 +85,7 @@ module ActiveSupport
response == Response::STORED
end
rescue MemCache::MemCacheError => e
logger.error("MemCacheError (#{e}): #{e.message}")
logger.error("MemCacheError (#{e}): #{e.message}") if logger
false
end
@ -95,7 +95,7 @@ module ActiveSupport
response == Response::DELETED
end
rescue MemCache::MemCacheError => e
logger.error("MemCacheError (#{e}): #{e.message}")
logger.error("MemCacheError (#{e}): #{e.message}") if logger
false
end