Exception: R10K::Error
- Inherits:
-
StandardError
- Object
- StandardError
- R10K::Error
- Defined in:
- lib/r10k/errors.rb
Overview
An error class that accepts an optional hash and wrapped error message
Direct Known Subclasses
Instance Attribute Summary collapse
-
#original ⇒ Object
Returns the value of attribute original.
Class Method Summary collapse
-
.wrap(original, mesg, options = {}) ⇒ R10K::Error
Generate a wrapped exception.
Instance Method Summary collapse
-
#initialize(mesg, options = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
Instance Attribute Details
#original ⇒ Object
Returns the value of attribute original.
13 14 15 |
# File 'lib/r10k/errors.rb', line 13 def original @original end |
Class Method Details
.wrap(original, mesg, options = {}) ⇒ R10K::Error
Generate a wrapped exception
22 23 24 25 26 27 |
# File 'lib/r10k/errors.rb', line 22 def self.wrap(original, mesg, = {}) new(mesg, ).tap do |e| e.set_backtrace(caller(4)) e.original = original end end |