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

#initialize(program, command_line, return_code) ⇒ ProgramExitedWithFailure

Returns a new instance of ProgramExitedWithFailure



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

#command_lineObject (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

#programObject (readonly)

Returns the value of attribute program



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

def program
  @program
end

#return_codeObject (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

#to_sObject



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