Exception: Polyphony::BaseException
- Defined in:
- lib/polyphony/core/exceptions.rb
Overview
Base exception class for interrupting fibers. These exceptions allow control of fibers. BaseException exceptions can encapsulate a value and thus provide a way to interrupt long-running blocking operations while still passing a value back to the call site. BaseException exceptions can also references a cancel scope in order to allow correct bubbling of exceptions through nested cancel scopes.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Exception value, used mainly for
MoveOn
exceptions.
Attributes inherited from Exception
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ BaseException
constructor
Initializes the exception, setting the caller and the value.
Methods inherited from Exception
#backtrace, instantiate, #invoke
Constructor Details
#initialize(value = nil) ⇒ BaseException
Initializes the exception, setting the caller and the value.
17 18 19 20 21 |
# File 'lib/polyphony/core/exceptions.rb', line 17 def initialize(value = nil) @caller_backtrace = caller @value = value super end |
Instance Attribute Details
#value ⇒ Object (readonly)
Exception value, used mainly for MoveOn
exceptions.
12 13 14 |
# File 'lib/polyphony/core/exceptions.rb', line 12 def value @value end |