Exception: Roby::SynchronousEventProcessingMultipleErrors
- Defined in:
- lib/roby/execution_engine.rb
Overview
Exception wrapper used to report that multiple errors have been raised during a synchronous event processing call.
See ExecutionEngine#process_events_synchronous for more information
Instance Attribute Summary collapse
-
#errors ⇒ Array<ExecutionEngine::PropagationInfo>
readonly
Exceptions as gathered during propagation with ExecutionEngine#task_m.
Instance Method Summary collapse
-
#initialize(errors) ⇒ SynchronousEventProcessingMultipleErrors
constructor
A new instance of SynchronousEventProcessingMultipleErrors.
-
#original_exceptions ⇒ Array<Exception>
The set of underlying “real” (i.e. non-Roby) exceptions.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(errors) ⇒ SynchronousEventProcessingMultipleErrors
Returns a new instance of SynchronousEventProcessingMultipleErrors.
21 22 23 24 25 |
# File 'lib/roby/execution_engine.rb', line 21 def initialize(errors) super() @errors = errors end |
Instance Attribute Details
#errors ⇒ Array<ExecutionEngine::PropagationInfo> (readonly)
Exceptions as gathered during propagation with ExecutionEngine#task_m
12 13 14 |
# File 'lib/roby/execution_engine.rb', line 12 def errors @errors end |
Instance Method Details
#original_exceptions ⇒ Array<Exception>
The set of underlying “real” (i.e. non-Roby) exceptions
17 18 19 |
# File 'lib/roby/execution_engine.rb', line 17 def original_exceptions errors end |
#pretty_print(pp) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/roby/execution_engine.rb', line 27 def pretty_print(pp) pp.text "Got #{errors.size} exceptions and #{original_exceptions.size} sub-exceptions" pp.breakable pp.seplist(errors.each_with_index) do |e, i| Roby.flatten_exception(e).each_with_index do |sub_e, sub_i| pp.breakable pp.text "[#{i}.#{sub_i}] " sub_e.pretty_print(pp) end end end |