123456789_123456789_123456789_123456789_123456789_

Class: Concurrent::MultipleErrors

Relationships & Source Files
Inherits: Concurrent::Error
Defined in: lib/concurrent-ruby/concurrent/errors.rb

Overview

Aggregates multiple exceptions.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(errors, message = "#{errors.size} errors") ⇒ MultipleErrors

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/errors.rb', line 61

def initialize(errors, message = "#{errors.size} errors")
  @errors = errors
  super [*message,
         *errors.map { |e| [format('%s (%s)', e.message, e.class), *e.backtrace] }.flatten(1)
        ].join("\n")
end

Instance Attribute Details

#errors (readonly)

[ GitHub ]

  
# File 'lib/concurrent-ruby/concurrent/errors.rb', line 59

attr_reader :errors