Exception: Async::Cancel::Cause
- Inherits:
-
Exception
- Object
- Exception
- Async::Cancel::Cause
- Defined in:
- lib/async/cancel.rb
Overview
Represents the source of the cancel operation.
Class Method Summary collapse
- .backtrace ⇒ Object
-
.for(message = "Task was cancelled!") ⇒ Object
Create a new cause of the cancel operation, with the given message.
Class Method Details
.backtrace ⇒ Object
13 14 15 |
# File 'lib/async/cancel.rb', line 13 def self.backtrace caller_locations(2..-1) end |
.for(message = "Task was cancelled!") ⇒ Object
Create a new cause of the cancel operation, with the given message.
27 28 29 30 31 |
# File 'lib/async/cancel.rb', line 27 def self.for( = "Task was cancelled!") instance = self.new() instance.set_backtrace(self.backtrace) return instance end |