Exception: AptControl::Exec::UnexpectedExitStatus

Inherits:
StandardError
  • Object
show all
Defined in:
lib/apt_control/exec.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expected, actual, cmd, output, stdout, stderr) ⇒ UnexpectedExitStatus

Returns a new instance of UnexpectedExitStatus.



9
10
11
12
13
14
15
16
# File 'lib/apt_control/exec.rb', line 9

def initialize(expected, actual, cmd, output, stdout, stderr)
  @expected = expected
  @actual = actual
  @command = cmd
  @stdout = stdout
  @stderr = stderr
  super("command '#{command}' exited with #{actual}, expected #{expected}")
end

Instance Attribute Details

#actualObject (readonly) Also known as: exitstatus

Returns the value of attribute actual.



18
19
20
# File 'lib/apt_control/exec.rb', line 18

def actual
  @actual
end

#commandObject (readonly)

Returns the value of attribute command.



18
19
20
# File 'lib/apt_control/exec.rb', line 18

def command
  @command
end

#expectObject (readonly)

Returns the value of attribute expect.



18
19
20
# File 'lib/apt_control/exec.rb', line 18

def expect
  @expect
end

#outputObject (readonly)

Returns the value of attribute output.



18
19
20
# File 'lib/apt_control/exec.rb', line 18

def output
  @output
end

#stderrObject (readonly)

Returns the value of attribute stderr.



18
19
20
# File 'lib/apt_control/exec.rb', line 18

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



18
19
20
# File 'lib/apt_control/exec.rb', line 18

def stdout
  @stdout
end