class ActiveSupport::Notifications::Fanout

def iterate_guarding_exceptions(listeners)

Experimental RBS support (using type sampling data from the type_fusion project).

def iterate_guarding_exceptions: ((Array[ActiveSupport::Notifications::Fanout::Subscribers::Evented] | Array[ActiveSupport::Notifications::Fanout::Subscribers::EventObject]) listeners) -> untyped

This signature was generated using 8 samples from 1 application.

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