Exception: Exception

Defined in:
lib/safegem/exception.rb

Instance Method Summary collapse

Instance Method Details

#to_hash(extra = nil) ⇒ Object



4
5
6
7
8
9
# File 'lib/safegem/exception.rb', line 4

def to_hash(extra = nil)
  h = { 'message' => message }
  h = h.merge('backtrace' => backtrace) if %w{development staging test}.include?(RACK_ENV)
  h = h.merge(extra) if extra
  h
end