Exception: CliTools::ShellExecutionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cli_tools/system.rb

Overview

Exception class which holds command execution status and current output for exceptions raised from ‘#sh’ method call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = "Failed to execute 'sh'", status, output) ⇒ ShellExecutionError

Returns a new instance of ShellExecutionError.



103
104
105
106
107
# File 'lib/cli_tools/system.rb', line 103

def initialize( msg = "Failed to execute 'sh'", status, output )
  super msg
  @status = status
  @output = output
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



102
103
104
# File 'lib/cli_tools/system.rb', line 102

def output
  @output
end

#statusObject (readonly)

Returns the value of attribute status.



102
103
104
# File 'lib/cli_tools/system.rb', line 102

def status
  @status
end