Exception: Async::Stop::Cause
- Inherits:
-
Exception
- Object
- Exception
- Async::Stop::Cause
- Defined in:
- lib/async/stop.rb
Overview
Represents the source of the stop operation.
Class Method Summary collapse
- .backtrace ⇒ Object
-
.for(message = "Task was stopped") ⇒ Object
Create a new cause of the stop operation, with the given message.
Class Method Details
.backtrace ⇒ Object
16 17 18 |
# File 'lib/async/stop.rb', line 16 def self.backtrace caller_locations(2..-1) end |
.for(message = "Task was stopped") ⇒ Object
Create a new cause of the stop operation, with the given message.
30 31 32 33 34 |
# File 'lib/async/stop.rb', line 30 def self.for( = "Task was stopped") instance = self.new() instance.set_backtrace(self.backtrace) return instance end |