Class: Vagabund::Settler::Errors::SettlerError
- Inherits:
-
Vagrant::Errors::VagrantError
- Object
- Vagrant::Errors::VagrantError
- Vagabund::Settler::Errors::SettlerError
- Defined in:
- lib/vagabund/settler/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
Instance Method Summary collapse
- #backtrace(orig = true) ⇒ Object
-
#initialize(*args) ⇒ SettlerError
constructor
A new instance of SettlerError.
- #message(orig = true) ⇒ Object
Constructor Details
#initialize(*args) ⇒ SettlerError
Returns a new instance of SettlerError.
18 19 20 21 |
# File 'lib/vagabund/settler/errors.rb', line 18 def initialize(*args) @original_error = args.shift if args.first.is_a?(Exception) super(*args) end |
Instance Attribute Details
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
5 6 7 |
# File 'lib/vagabund/settler/errors.rb', line 5 def original_error @original_error end |
Instance Method Details
#backtrace(orig = true) ⇒ Object
14 15 16 |
# File 'lib/vagabund/settler/errors.rb', line 14 def backtrace(orig=true) !orig || original_error.nil? ? super() : original_error.backtrace end |
#message(orig = true) ⇒ Object
9 10 11 12 |
# File 'lib/vagabund/settler/errors.rb', line 9 def (orig=true) return super() if !orig || original_error.nil? "#{original_error.class.name}: #{original_error.}" end |