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
ConfigError, Deployment::Config::ConfigError, Git::GitError, Settings::Collection::ValidationError, Settings::List::ValidationError, Settings::Loader::ConfigError, Util::Subprocess::SubprocessError
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.
8 9 10 |
# File 'lib/r10k/errors.rb', line 8 def original @original end |
Class Method Details
.wrap(original, mesg, options = {}) ⇒ R10K::Error
Generate a wrapped exception
17 18 19 20 21 22 |
# File 'lib/r10k/errors.rb', line 17 def self.wrap(original, mesg, = {}) new(mesg, ).tap do |e| e.set_backtrace(caller(4)) e.original = original end end |