diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/subscriber.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/subscriber.rb b/railties/lib/rails/subscriber.rb index 2674bf003e..9965786d86 100644 --- a/railties/lib/rails/subscriber.rb +++ b/railties/lib/rails/subscriber.rb @@ -63,7 +63,11 @@ module Rails subscriber = subscribers[namespace.to_sym] if subscriber.respond_to?(name) && subscriber.logger - subscriber.send(name, ActiveSupport::Notifications::Event.new(*args)) + begin + subscriber.send(name, ActiveSupport::Notifications::Event.new(*args)) + rescue Exception => e + Rails.logger.error "Could not log #{args[0].inspect} event. #{e.class}: #{e.message}" + end end if args[0] == "action_dispatch.after_dispatch" && !subscribers.empty? |