aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/notifications
diff options
context:
space:
mode:
authorRyan T. Hosford <tad.hosford@gmail.com>2015-12-30 13:44:18 -0600
committerRyan T. Hosford <tad.hosford@gmail.com>2015-12-31 01:48:22 -0600
commit3e48bfd49730331d8f09d4d96bb9a58959017a9c (patch)
treef7f516d113f3aaaed99ad131ed3b630ff59aa46d /activesupport/lib/active_support/notifications
parentf390bd42b8fec6423567e782a2716bda95295f9d (diff)
downloadrails-3e48bfd49730331d8f09d4d96bb9a58959017a9c.tar.gz
rails-3e48bfd49730331d8f09d4d96bb9a58959017a9c.tar.bz2
rails-3e48bfd49730331d8f09d4d96bb9a58959017a9c.zip
Adds exception object to instrumenter's payload
- Adds new key/value pair to payload when an exception is raised e.g. `:exception_object=> #<RuntimeError: FAIL>` - Updates relevant test - Adds CHANGELOG entry
Diffstat (limited to 'activesupport/lib/active_support/notifications')
-rw-r--r--activesupport/lib/active_support/notifications/instrumenter.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb
index 67f2ee1a7f..91f94cb2d7 100644
--- a/activesupport/lib/active_support/notifications/instrumenter.rb
+++ b/activesupport/lib/active_support/notifications/instrumenter.rb
@@ -21,6 +21,7 @@ module ActiveSupport
yield payload
rescue Exception => e
payload[:exception] = [e.class.name, e.message]
+ payload[:exception_object] = e
raise e
ensure
finish_with_state listeners_state, name, payload