Module: Rack::Insight::Database::DataTable::ErrorWrapper

Included in:
DecodingError, EncodingError
Defined in:
lib/rack/insight/database.rb

Overview

We sometimes get errors in the encoding and decoding, and they could be from any number of root causes. This will allow those root causes to be exposed at the top layer by wrapping all errors in a Rack::Insight namespaced error class, which will be rescued higher up the stack.

Instance Method Summary collapse

Instance Method Details

#new(parent, message = '') ⇒ Object



207
208
209
210
211
# File 'lib/rack/insight/database.rb', line 207

def new(parent, message = '')
  ex = super("#{message}#{parent.class}: #{parent.message}")
  ex.set_backtrace parent.backtrace
  ex
end