Exception: Roby::Promise::Failure Private
- Defined in:
- lib/roby/promise.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.
Encapsulation of an exception raised by a callback
For whatever reason, the concurrent-ruby developers decided that a non-RuntimeError would be fatal to the promise (not be handled “normally”).
Roby never had such a constraint, so that’s dangerous here. Encapsulate an exception in Failure to pass it out of the concurrent-ruby promise.
Instance Attribute Summary collapse
- #actual_exception ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(error) ⇒ Failure
constructor
private
A new instance of Failure.
Constructor Details
#initialize(error) ⇒ Failure
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 Failure.
136 137 138 139 140 |
# File 'lib/roby/promise.rb', line 136 def initialize(error) super() @actual_exception = error end |
Instance Attribute Details
#actual_exception ⇒ 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.
134 135 136 |
# File 'lib/roby/promise.rb', line 134 def actual_exception @actual_exception end |