Exception: Babl::ModuleError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ ModuleError

Returns a new instance of ModuleError.



15
16
17
18
19
20
# File 'lib/babl.rb', line 15

def initialize opts = {}
  @stdout = opts[:stdout]
  @stderr = opts[:stderr]
  @exitcode = opts[:exitcode]
  @payload_url = opts[:payload_url]
end

Instance Attribute Details

#exitcodeObject (readonly)

Returns the value of attribute exitcode.



13
14
15
# File 'lib/babl.rb', line 13

def exitcode
  @exitcode
end

#payload_urlObject (readonly)

Returns the value of attribute payload_url.



13
14
15
# File 'lib/babl.rb', line 13

def payload_url
  @payload_url
end

#stderrObject (readonly)

Returns the value of attribute stderr.



13
14
15
# File 'lib/babl.rb', line 13

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



13
14
15
# File 'lib/babl.rb', line 13

def stdout
  @stdout
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/babl.rb', line 22

def to_s
  "Module execution failed with exitcode #{exitcode}. Payload url: #{payload_url}. Stderr:\n#{stderr}"
end