Exception: Fibre::FiberError
- Inherits:
-
StandardError
- Object
- StandardError
- Fibre::FiberError
- Defined in:
- lib/fibre/fiber_error.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(parent = $!) ⇒ FiberError
constructor
A new instance of FiberError.
- #set_backtrace(backtrace) ⇒ Object
Constructor Details
#initialize(parent = $!) ⇒ FiberError
Returns a new instance of FiberError.
5 6 7 8 |
# File 'lib/fibre/fiber_error.rb', line 5 def initialize parent = $! @parent = parent super(parent && parent.to_s) end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
3 4 5 |
# File 'lib/fibre/fiber_error.rb', line 3 def parent @parent end |
Instance Method Details
#set_backtrace(backtrace) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/fibre/fiber_error.rb', line 10 def set_backtrace backtrace bt = backtrace if parent bt = parent.backtrace || [] bt << "<<< parent fiber: #{parent.class.to_s}: #{parent}" bt.concat backtrace end super bt end |