Exception: RSCM::CommandLine::ExecutionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rscm/command_line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd, full_cmd, dir, exitstatus, stderr) ⇒ ExecutionError

Returns a new instance of ExecutionError.



10
11
12
# File 'lib/rscm/command_line.rb', line 10

def initialize(cmd, full_cmd, dir, exitstatus, stderr)
  @cmd, @full_cmd, @dir, @exitstatus, @stderr = cmd, full_cmd, dir, exitstatus, stderr
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



9
10
11
# File 'lib/rscm/command_line.rb', line 9

def cmd
  @cmd
end

#dirObject (readonly)

Returns the value of attribute dir.



9
10
11
# File 'lib/rscm/command_line.rb', line 9

def dir
  @dir
end

#exitstatusObject (readonly)

Returns the value of attribute exitstatus.



9
10
11
# File 'lib/rscm/command_line.rb', line 9

def exitstatus
  @exitstatus
end

#stderrObject (readonly)

Returns the value of attribute stderr.



9
10
11
# File 'lib/rscm/command_line.rb', line 9

def stderr
  @stderr
end

Instance Method Details

#to_sObject



13
14
15
16
17
18
19
# File 'lib/rscm/command_line.rb', line 13

def to_s
  "\ndir : #{@dir}\n" +
  "command : #{@cmd}\n" +
  "executed command : #{@full_cmd}\n" +
  "exitstatus: #{@exitstatus}\n" +
  "STDERR TAIL START\n#{@stderr}\nSTDERR TAIL END\n"
end