aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorWinston <winston.yongwei@gmail.com>2012-02-22 19:19:05 +0800
committerWinston <winston.yongwei@gmail.com>2012-02-22 19:19:05 +0800
commitb52c66f1bedb6ed5a08c106a199a53f67c9f6ec2 (patch)
tree981071c71d10d4df2d1dc8bcd404ccd407669fe0 /activesupport/lib/active_support
parenta95f730ea45f01744702849fc084b4d28c857964 (diff)
downloadrails-b52c66f1bedb6ed5a08c106a199a53f67c9f6ec2.tar.gz
rails-b52c66f1bedb6ed5a08c106a199a53f67c9f6ec2.tar.bz2
rails-b52c66f1bedb6ed5a08c106a199a53f67c9f6ec2.zip
#read_entry in ActiveSupport::Cache::FileStore should log details of the exception when an exception is thrown.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/cache/file_store.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb
index b7712a4a15..70116c0b36 100644
--- a/activesupport/lib/active_support/cache/file_store.rb
+++ b/activesupport/lib/active_support/cache/file_store.rb
@@ -81,7 +81,8 @@ module ActiveSupport
if File.exist?(file_name)
File.open(file_name) { |f| Marshal.load(f) }
end
- rescue
+ rescue => e
+ logger.error("FileStoreError (#{e}): #{e.message}") if logger
nil
end