diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-07-21 16:29:26 -0700 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-07-22 11:36:16 -0700 |
commit | ba8d89c4c8d1c038c0d6fc9dbfe22f6d528d0da9 (patch) | |
tree | b8d1df3420ccef896537f1d74f2022569dfa3bcf /activesupport/lib/active_support/notifications/instrumenter.rb | |
parent | 97f3c7387e22c7752310a6b9c74ddb9fd3a8eb2d (diff) | |
download | rails-ba8d89c4c8d1c038c0d6fc9dbfe22f6d528d0da9.tar.gz rails-ba8d89c4c8d1c038c0d6fc9dbfe22f6d528d0da9.tar.bz2 rails-ba8d89c4c8d1c038c0d6fc9dbfe22f6d528d0da9.zip |
Performance optimizations to handle cases of instrumentors that are not listened to. Also, fix a possible concurrency issue.
Diffstat (limited to 'activesupport/lib/active_support/notifications/instrumenter.rb')
-rw-r--r-- | activesupport/lib/active_support/notifications/instrumenter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb index e98189f899..713d5a5f25 100644 --- a/activesupport/lib/active_support/notifications/instrumenter.rb +++ b/activesupport/lib/active_support/notifications/instrumenter.rb @@ -19,7 +19,7 @@ module ActiveSupport def instrument(name, payload={}) begin @started = Time.now - yield(payload) if block_given? + yield rescue Exception => e payload[:exception] = [e.class.name, e.message] raise e |