Exception: Async::Container::Thread::Exit

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

Overview

Used to propagate the exit status of a child process invoked by Instance#exec.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ Exit

Initialize the exit status.



35
36
37
# File 'lib/async/container/thread.rb', line 35

def initialize(status)
	@status = status
end

Instance Attribute Details

#statusObject (readonly)

The process exit status.



41
42
43
# File 'lib/async/container/thread.rb', line 41

def status
  @status
end

Instance Method Details

#errorObject

The process exit status if it was an error.



45
46
47
48
49
# File 'lib/async/container/thread.rb', line 45

def error
	unless status.success?
		status
	end
end