Exception: POpen4::ExecuteError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/buzzcore/shell_extras.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aArg) ⇒ ExecuteError

Returns a new instance of ExecuteError.



9
10
11
12
13
14
15
16
17
# File 'lib/buzzcore/shell_extras.rb', line 9

def initialize(aArg)
  if aArg.is_a? Hash
msg = ([aArg[:stderr],aArg[:stdout],"Error #{aArg[:exitcode].to_s}"].find {|i| i && !i.empty?})
    super(msg)
    @result = aArg
  else
    super(aArg)
  end
end

Instance Attribute Details

#resultObject (readonly)

,:stderr,:stdout,:exitcode,:pid



7
8
9
# File 'lib/buzzcore/shell_extras.rb', line 7

def result
  @result
end

Instance Method Details

#inspectObject



19
20
21
# File 'lib/buzzcore/shell_extras.rb', line 19

def inspect
	"#{self.class.to_s}: #{@result.inspect}"
end