instance method iterate_guarding_exceptions

Ruby on Rails 7.0.10

Since v7.0.10 Last seen in v7.0.10

Signature

iterate_guarding_exceptions(listeners)

No documentation comment.

Parameters

listeners req
Source
# File activesupport/lib/active_support/notifications/fanout.rb, line 87
      def iterate_guarding_exceptions(listeners)
        exceptions = nil

        listeners.each do |s|
          yield s
        rescue Exception => e
          exceptions ||= []
          exceptions << e
        end

        if exceptions
          if exceptions.size == 1
            raise exceptions.first
          else
            raise InstrumentationSubscriberError.new(exceptions), cause: exceptions.first
          end
        end

        listeners
      end

Defined in activesupport/lib/active_support/notifications/fanout.rb line 87 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Notifications::Fanout

Type at least 2 characters to search.

↑↓ navigate · open · esc close