From 4704af763f47362135b644302b8666e36a58fb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 12 Jan 2010 13:07:04 +0100 Subject: Do not send notifications when instrumentation raise an error. --- activesupport/lib/active_support/notifications/instrumenter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb index 3b0b0d8da2..af35eb92cb 100644 --- a/activesupport/lib/active_support/notifications/instrumenter.rb +++ b/activesupport/lib/active_support/notifications/instrumenter.rb @@ -13,9 +13,9 @@ module ActiveSupport def instrument(name, payload={}) time = Time.now - yield if block_given? - ensure + result = yield if block_given? @notifier.publish(name, time, Time.now, @id, payload) + result end private -- cgit v1.2.3