Exception: Roby::SynchronousEventProcessingMultipleErrors

Inherits:
RuntimeError
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ SynchronousEventProcessingMultipleErrors

Returns a new instance of SynchronousEventProcessingMultipleErrors.



19
20
21
# File 'lib/roby/execution_engine.rb', line 19

def initialize(errors)
    @errors = errors
end

Instance Attribute Details

#errorsArray<ExecutionEngine::PropagationInfo> (readonly)

Exceptions as gathered during propagation with ExecutionEngine#task_m



10
11
12
# File 'lib/roby/execution_engine.rb', line 10

def errors
  @errors
end

Instance Method Details

#original_exceptionsArray<Exception>

The set of underlying “real” (i.e. non-Roby) exceptions

Returns:



15
16
17
# File 'lib/roby/execution_engine.rb', line 15

def original_exceptions
    errors
end

#pretty_print(pp) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/roby/execution_engine.rb', line 23

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