Exception: R10K::Util::Subprocess::SubprocessError
- Defined in:
- lib/r10k/util/subprocess.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(mesg = nil, options = {}) ⇒ SubprocessError
constructor
A new instance of SubprocessError.
- #to_s ⇒ Object
Constructor Details
#initialize(mesg = nil, options = {}) ⇒ SubprocessError
Returns a new instance of SubprocessError.
92 93 94 95 |
# File 'lib/r10k/util/subprocess.rb', line 92 def initialize(mesg = nil, = {}) super @result = @options[:result] end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
90 91 92 |
# File 'lib/r10k/util/subprocess.rb', line 90 def result @result end |
Instance Method Details
#to_s ⇒ Object
97 98 99 100 101 102 103 |
# File 'lib/r10k/util/subprocess.rb', line 97 def to_s if @mesg @mesg else "Command #{@result.cmd} exited with #{@result.exit_code}: #{@result.stderr}" end end |