lib/raven/railtie.rb in sentry-raven-0.9.4 vs lib/raven/railtie.rb in sentry-raven-0.10.1

- old
+ new

@@ -18,15 +18,17 @@ Raven.configure(true) do |config| config.logger ||= ::Rails.logger config.project_root ||= ::Rails.root end - if defined?(::ActionDispatch::DebugExceptions) - require 'raven/rails/middleware/debug_exceptions_catcher' - ::ActionDispatch::DebugExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher) - elsif defined?(::ActionDispatch::ShowExceptions) - require 'raven/rails/middleware/debug_exceptions_catcher' - ::ActionDispatch::ShowExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher) + if Raven.configuration.catch_debugged_exceptions + if defined?(::ActionDispatch::DebugExceptions) + require 'raven/rails/middleware/debug_exceptions_catcher' + ::ActionDispatch::DebugExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher) + elsif defined?(::ActionDispatch::ShowExceptions) + require 'raven/rails/middleware/debug_exceptions_catcher' + ::ActionDispatch::ShowExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher) + end end end rake_tasks do require 'raven/tasks'