Exception: Vanagon::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Vanagon::Error
- Defined in:
- lib/vanagon/errors.rb
Overview
An error class that accepts a wrapped error message
Instance Attribute Summary collapse
-
#original ⇒ Object
Returns the value of attribute original.
Class Method Summary collapse
-
.wrap(original, mesg) ⇒ Vanagon::Error
Generate a wrapped exception.
Instance Method Summary collapse
-
#initialize(mesg) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(mesg) ⇒ Error
Returns a new instance of Error.
24 25 26 |
# File 'lib/vanagon/errors.rb', line 24 def initialize(mesg) super(mesg) end |
Instance Attribute Details
#original ⇒ Object
Returns the value of attribute original.
6 7 8 |
# File 'lib/vanagon/errors.rb', line 6 def original @original end |
Class Method Details
.wrap(original, mesg) ⇒ Vanagon::Error
Generate a wrapped exception
14 15 16 17 18 19 |
# File 'lib/vanagon/errors.rb', line 14 def self.wrap(original, mesg) new(mesg).tap do |e| e.set_backtrace(caller(4)) e.original = original end end |