Class: Appsignal::ExceptionNotification

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/exception_notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, exception) ⇒ ExceptionNotification

Returns a new instance of ExceptionNotification.



10
11
12
13
14
15
# File 'lib/appsignal/exception_notification.rb', line 10

def initialize(env, exception)
  @exception  = exception
  @backtrace  = Rails.respond_to?(:backtrace_cleaner) ?
      Rails.backtrace_cleaner.send(:filter, exception.backtrace) :
      exception.backtrace
end

Instance Attribute Details

#backtraceObject (readonly)

Returns the value of attribute backtrace.



8
9
10
# File 'lib/appsignal/exception_notification.rb', line 8

def backtrace
  @backtrace
end

#envObject (readonly)

Returns the value of attribute env.



8
9
10
# File 'lib/appsignal/exception_notification.rb', line 8

def env
  @env
end

#exceptionObject (readonly)

Returns the value of attribute exception.



8
9
10
# File 'lib/appsignal/exception_notification.rb', line 8

def exception
  @exception
end

#kontrollerObject (readonly)

Returns the value of attribute kontroller.



8
9
10
# File 'lib/appsignal/exception_notification.rb', line 8

def kontroller
  @kontroller
end

#requestObject (readonly)

Returns the value of attribute request.



8
9
10
# File 'lib/appsignal/exception_notification.rb', line 8

def request
  @request
end

Instance Method Details

#messageObject



21
22
23
# File 'lib/appsignal/exception_notification.rb', line 21

def message
  @exception.message
end

#nameObject



17
18
19
# File 'lib/appsignal/exception_notification.rb', line 17

def name
  @exception.class.name
end