Method: Exceptional::ExceptionData#to_hash

Defined in:
lib/exceptional/exception_data.rb

#to_hashObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/exceptional/exception_data.rb', line 10

def to_hash
  hash = ::Exceptional::ApplicationEnvironment.to_hash(framework)
  hash.merge!({
    'exception' => {
      'exception_class' => @exception.class.to_s,
      'message' => @exception.message,
      'backtrace' => @exception.backtrace,
      'occurred_at' => Time.now
    }
  })
  hash.merge!(extra_stuff)
  hash.merge!(context_stuff)
  self.class.sanitize_hash(hash)
end