Module: HumanError::Error::ClassMethods

Defined in:
lib/human_error/error.rb

Instance Method Summary collapse

Instance Method Details

#wrap(other) ⇒ Object



8
9
10
11
12
# File 'lib/human_error/error.rb', line 8

def wrap(other)
  wrapped_error = new message: "#{other.class.name}: #{other.message}"
  wrapped_error.set_backtrace other.backtrace
  wrapped_error
end