Exception: Bake::Gem::CommandExecutionError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/bake/gem/shell.rb

Overview

Exception raised when a command execution fails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status) ⇒ CommandExecutionError

Initialize the exception with the specified message and process status.



17
18
19
20
# File 'lib/bake/gem/shell.rb', line 17

def initialize(message, status)
	super(message)
	@status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



23
24
25
# File 'lib/bake/gem/shell.rb', line 23

def status
  @status
end

#The status object of the failed command.(statusobjectofthefailedcommand.) ⇒ Object (readonly)



23
# File 'lib/bake/gem/shell.rb', line 23

attr_reader :status

Instance Method Details

#exit_codeObject

Helper method for convenience.



26
27
28
# File 'lib/bake/gem/shell.rb', line 26

def exit_code
	@status.exitstatus
end