Exception: CommandUtils::NonZeroStatus

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/command_utils/non_zero_status.rb

Overview

Raised when executed command does not return 0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status, command) ⇒ NonZeroStatus

Returns a new instance of NonZeroStatus.



11
12
13
14
# File 'lib/command_utils/non_zero_status.rb', line 11

def initialize message, status, command
  super message
  @status, @command = status, command
end

Instance Attribute Details

#commandObject

Command as passed to Process#spawn



9
10
11
# File 'lib/command_utils/non_zero_status.rb', line 9

def command
  @command
end

#statusObject

Command exit status



7
8
9
# File 'lib/command_utils/non_zero_status.rb', line 7

def status
  @status
end