Exception: SiteFuel::External::ProgramExitedWithFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sitefuel/external/AbstractExternalProgram.rb

Overview

raised when a program exits with a return code other than 0, generally indicating some sort of failure.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ProgramExitedWithFailure) initialize(program, command_line, return_code)



141
142
143
144
145
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 141

def initialize(program, command_line, return_code)
  @program = program
  @command_line = command_line
  @return_code = return_code
end

Instance Attribute Details

- (Object) command_line (readonly)

Returns the value of attribute command_line



140
141
142
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 140

def command_line
  @command_line
end

- (Object) program (readonly)

Returns the value of attribute program



140
141
142
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 140

def program
  @program
end

- (Object) return_code (readonly)

Returns the value of attribute return_code



140
141
142
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 140

def return_code
  @return_code
end

Instance Method Details

- (Object) to_s



147
148
149
150
# File 'lib/sitefuel/external/AbstractExternalProgram.rb', line 147

def to_s
  "Program %s exited with %d when evaluating:\n%s" %
  [program, return_code, command_line]
end