Exception: Execution::CommandFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/git_workflow/core_ext.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, result) ⇒ CommandFailure

Returns a new instance of CommandFailure.



50
51
52
53
# File 'lib/git_workflow/core_ext.rb', line 50

def initialize(command, result)
  super("Command '#{ command }' failed")
  @result = result
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



48
49
50
# File 'lib/git_workflow/core_ext.rb', line 48

def result
  @result
end

Instance Method Details

#raise_if_required!Object

Raises:

  • (self)


55
56
57
# File 'lib/git_workflow/core_ext.rb', line 55

def raise_if_required!
  raise self unless @result.exitstatus == 0
end