Exception: Async::Stop::Cause

Inherits:
Exception
  • Object
show all
Defined in:
lib/async/stop.rb

Overview

Represents the source of the stop operation.

Class Method Summary collapse

Class Method Details

.backtraceObject



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(message = "Task was stopped")
	instance = self.new(message)
	instance.set_backtrace(self.backtrace)
	return instance
end