Exception: R10K::Util::Subprocess::SubprocessError Private

Inherits:
Error
  • Object
show all
Includes:
R10K::Util::Setopts
Defined in:
lib/r10k/util/subprocess/subprocess_error.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Attribute Summary collapse

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods included from Logging

debug_formatter, default_formatter, default_outputter, #logger, #logger_name, parse_level

Methods inherited from Error

wrap

Constructor Details

#initialize(mesg, options = {}) ⇒ SubprocessError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SubprocessError.



13
14
15
16
# File 'lib/r10k/util/subprocess/subprocess_error.rb', line 13

def initialize(mesg, options = {})
  super
  setopts(options, {:result => true})
end

Instance Attribute Details

#resultObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

!@attribute [r] result

@return [R10K::Util::Subprocess::Result]


9
10
11
# File 'lib/r10k/util/subprocess/subprocess_error.rb', line 9

def result
  @result
end

Instance Method Details

#messageObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
21
22
23
# File 'lib/r10k/util/subprocess/subprocess_error.rb', line 18

def message
  msg = []
  msg << "#{super}:"
  msg << @result.format
  msg.join("\n")
end