Exception: OsCtl::Lib::Exceptions::SystemCommandFailed

Inherits:
StandardError
  • Object
show all
Defined in:
lib/libosctl/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd, rc, output) ⇒ SystemCommandFailed

Returns a new instance of SystemCommandFailed.



6
7
8
9
10
11
12
# File 'lib/libosctl/exceptions.rb', line 6

def initialize(cmd, rc, output)
  @cmd = cmd
  @rc = rc
  @output = output

  super("command '#{cmd}' exited with code '#{rc}', output: '#{output}'")
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



4
5
6
# File 'lib/libosctl/exceptions.rb', line 4

def cmd
  @cmd
end

#outputObject (readonly)

Returns the value of attribute output.



4
5
6
# File 'lib/libosctl/exceptions.rb', line 4

def output
  @output
end

#rcObject (readonly)

Returns the value of attribute rc.



4
5
6
# File 'lib/libosctl/exceptions.rb', line 4

def rc
  @rc
end