Exception: Tetra::ExecutionFailed

Inherits:
Exception
  • Object
show all
Defined in:
lib/tetra/facades/process_runner.rb

Overview

raised when a command returns a non-zero status

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commandline, status, out, err) ⇒ ExecutionFailed



72
73
74
75
76
77
# File 'lib/tetra/facades/process_runner.rb', line 72

def initialize(commandline, status, out, err)
  @commandline = commandline
  @status = status
  @out = out
  @err = err
end

Instance Attribute Details

#commandlineObject (readonly)

Returns the value of attribute commandline.



67
68
69
# File 'lib/tetra/facades/process_runner.rb', line 67

def commandline
  @commandline
end

#errObject (readonly)

Returns the value of attribute err.



70
71
72
# File 'lib/tetra/facades/process_runner.rb', line 70

def err
  @err
end

#outObject (readonly)

Returns the value of attribute out.



69
70
71
# File 'lib/tetra/facades/process_runner.rb', line 69

def out
  @out
end

#statusObject (readonly)

Returns the value of attribute status.



68
69
70
# File 'lib/tetra/facades/process_runner.rb', line 68

def status
  @status
end

Instance Method Details

#to_sObject



79
80
81
# File 'lib/tetra/facades/process_runner.rb', line 79

def to_s
  "\"#{@commandline}\" failed with status #{@status}\n#{out}\n#{err}"
end