Exception: VCAP::SubprocessStatusError

Inherits:
SubprocessError show all
Defined in:
lib/vcap/subprocess.rb

Overview

Command exited with unexpected status code

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, stdout, stderr, status) ⇒ SubprocessStatusError

Returns a new instance of SubprocessStatusError.



10
11
12
13
14
15
# File 'lib/vcap/subprocess.rb', line 10

def initialize(command, stdout, stderr, status)
  @command     = command
  @status      = status
  @stdout      = stdout
  @stderr      = stderr
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



8
9
10
# File 'lib/vcap/subprocess.rb', line 8

def command
  @command
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/vcap/subprocess.rb', line 8

def status
  @status
end

#stderrObject (readonly)

Returns the value of attribute stderr.



8
9
10
# File 'lib/vcap/subprocess.rb', line 8

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



8
9
10
# File 'lib/vcap/subprocess.rb', line 8

def stdout
  @stdout
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/vcap/subprocess.rb', line 17

def to_s
  "ERROR: Command '#{@command}' exited with status '#{status.exitstatus}'"
end