Exception: Philiprehberger::TaskRunner::CommandError

Inherits:
Error
  • Object
show all
Defined in:
lib/philiprehberger/task_runner.rb

Overview

Raised by run! when the command exits with a non-zero status.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ CommandError

Returns a new instance of CommandError.



19
20
21
22
# File 'lib/philiprehberger/task_runner.rb', line 19

def initialize(result)
  @result = result
  super("command exited with code #{result.exit_code}")
end

Instance Attribute Details

#resultResult (readonly)

Returns the failed command result.

Returns:

  • (Result)

    the failed command result



17
18
19
# File 'lib/philiprehberger/task_runner.rb', line 17

def result
  @result
end