Exception: Bunny::AccumulatedExceptions
- Defined in:
- lib/bunny/exceptions.rb
Overview
Exception wrapper that holds multiple accumulated exceptions. Raised by ExceptionAccumulator#raise_all! when multiple exceptions occurred.
Instance Attribute Summary collapse
- #exceptions ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(exceptions) ⇒ AccumulatedExceptions
constructor
A new instance of AccumulatedExceptions.
Constructor Details
#initialize(exceptions) ⇒ AccumulatedExceptions
Returns a new instance of AccumulatedExceptions.
294 295 296 297 298 |
# File 'lib/bunny/exceptions.rb', line 294 def initialize(exceptions) @exceptions = exceptions = exceptions.map { |e| "#{e.class}: #{e.message}" } super("#{exceptions.count} exception(s) accumulated:\n #{messages.join("\n ")}") end |
Instance Attribute Details
#exceptions ⇒ Object (readonly)
292 293 294 |
# File 'lib/bunny/exceptions.rb', line 292 def exceptions @exceptions end |