aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-13 11:43:13 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-13 11:43:13 -0800
commit5dc4868962b77858ce477e17dbaf07bb4155d38d (patch)
tree54824519f9e5dbbb4e0cb3381d9176bae8e7104d /actionpack/lib
parentab802e72dc08a44e1a9fe767635dfd184274caad (diff)
parent081431fdf180ec7395c769793b2270d244566ca2 (diff)
downloadrails-5dc4868962b77858ce477e17dbaf07bb4155d38d.tar.gz
rails-5dc4868962b77858ce477e17dbaf07bb4155d38d.tar.bz2
rails-5dc4868962b77858ce477e17dbaf07bb4155d38d.zip
Merge pull request #3970 from lest/backtrace-when-silenced
log exception backtrace when all backtrace lines silenced
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_exceptions.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
index 417701ea54..cd4af82c6e 100644
--- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -59,10 +59,13 @@ module ActionDispatch
exception = wrapper.exception
+ trace = wrapper.application_trace
+ trace = wrapper.framework_trace if trace.empty?
+
ActiveSupport::Deprecation.silence do
message = "\n#{exception.class} (#{exception.message}):\n"
message << exception.annoted_source_code.to_s if exception.respond_to?(:annoted_source_code)
- message << " " << wrapper.application_trace.join("\n ")
+ message << " " << trace.join("\n ")
logger.fatal("#{message}\n\n")
end
end