Module: HumanError::Error::ClassMethods

Defined in:
lib/human_error/error.rb

Instance Method Summary collapse

Instance Method Details

#wrap(other) ⇒ Object



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

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