From e5647be02281cbac9ae612b67e7ad3ab6ba76965 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 16 Mar 2016 08:04:36 +0100 Subject: [PATCH] Improved error handling. --- lib/cache.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cache.rb b/lib/cache.rb index 69ef8f905..d4ed9235a 100644 --- a/lib/cache.rb +++ b/lib/cache.rb @@ -10,6 +10,8 @@ delete a cache def self.delete(key) Rails.cache.delete(key.to_s) + rescue => e + Rails.logger.error "ERROR: Cache.delete #{e.message}" end =begin @@ -31,7 +33,7 @@ write a cache begin Rails.cache.write(key.to_s, data, params) rescue => e - Rails.logger.error "NOTICE: #{e.message}" + Rails.logger.error "ERROR: Cache.write #{e.message}" end end