Class: Roby::ExecutionEngine::ExceptionPropagationVisitor Private
- Inherits:
-
Relations::ForkMergeVisitor
- Object
- RGL::DFSVisitor
- Relations::ForkMergeVisitor
- Roby::ExecutionEngine::ExceptionPropagationVisitor
- Defined in:
- lib/roby/execution_engine.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Graph visitor that propagates exceptions in the dependency graph
Instance Attribute Summary collapse
- #exception_handler ⇒ Object readonly private
- #handled_exceptions ⇒ Object readonly private
- #unhandled_exceptions ⇒ Object readonly private
Attributes inherited from Relations::ForkMergeVisitor
#in_degree, #origin, #origin_neighbours, #out_degree, #pending_merges, #vertex_to_object
Instance Method Summary collapse
- #fork_object(obj) ⇒ Object private
- #handle_examine_vertex(u) ⇒ Object private
-
#initialize(graph, object, origin, origin_neighbours, exception_handler) ⇒ ExceptionPropagationVisitor
constructor
private
A new instance of ExceptionPropagationVisitor.
- #propagate_object(u, v, obj) ⇒ Object private
Methods inherited from Relations::ForkMergeVisitor
#compute_in_out_degrees, #follow_edge?, #handle_back_edge, #handle_forward_edge, #handle_tree_edge, #visit
Constructor Details
#initialize(graph, object, origin, origin_neighbours, exception_handler) ⇒ ExceptionPropagationVisitor
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExceptionPropagationVisitor.
1213 1214 1215 1216 1217 1218 |
# File 'lib/roby/execution_engine.rb', line 1213 def initialize(graph, object, origin, origin_neighbours, exception_handler) super(graph, object, origin, origin_neighbours) @exception_handler = exception_handler @handled_exceptions = [] @unhandled_exceptions = [] end |
Instance Attribute Details
#exception_handler ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1211 1212 1213 |
# File 'lib/roby/execution_engine.rb', line 1211 def exception_handler @exception_handler end |
#handled_exceptions ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1211 1212 1213 |
# File 'lib/roby/execution_engine.rb', line 1211 def handled_exceptions @handled_exceptions end |
#unhandled_exceptions ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1211 1212 1213 |
# File 'lib/roby/execution_engine.rb', line 1211 def unhandled_exceptions @unhandled_exceptions end |
Instance Method Details
#fork_object(obj) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1229 1230 1231 |
# File 'lib/roby/execution_engine.rb', line 1229 def fork_object(obj) obj.fork end |
#handle_examine_vertex(u) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 |
# File 'lib/roby/execution_engine.rb', line 1233 def handle_examine_vertex(u) e = vertex_to_object.fetch(u) return unless e if e.handled = exception_handler[e, u] handled_exceptions << e elsif out_degree[u] == 0 unhandled_exceptions << e end end |
#propagate_object(u, v, obj) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1220 1221 1222 1223 1224 1225 1226 1227 |
# File 'lib/roby/execution_engine.rb', line 1220 def propagate_object(u, v, obj) raise if u == v unless obj.handled? obj.propagate(u, v) obj end end |