class Vanagon::Error
An error class that accepts a wrapped error message
Attributes
original[RW]
Public Class Methods
new(mesg)
click to toggle source
@overload initialize(mesg)
@param mesg [String] The exception mesg
Calls superclass method
# File lib/vanagon/errors.rb, line 23 def initialize(mesg) super(mesg) end
wrap(original, mesg)
click to toggle source
Generate a wrapped exception
@param original [Exception] The exception to wrap @param mesg [String]
@return [Vanagon::Error]
# File lib/vanagon/errors.rb, line 13 def self.wrap(original, mesg) new(mesg).tap do |e| e.set_backtrace(caller(4)) e.original = original end end