Module: ContextualExceptions::ContextualError

Defined in:
lib/contextual_exceptions/contextual_error.rb

Instance Method Summary collapse

Instance Method Details

#with_context(message, e) ⇒ Object



3
4
5
6
7
# File 'lib/contextual_exceptions/contextual_error.rb', line 3

def with_context(message, e)
  new_e = new(message << ": #{e.message}")
  new_e.set_backtrace e.backtrace
  new_e
end