Class: Justlogging::ExceptionNotification

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, exception) ⇒ ExceptionNotification

Returns a new instance of ExceptionNotification.



12
13
14
15
16
17
# File 'lib/justlogging/exception_notification.rb', line 12

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.



10
11
12
# File 'lib/justlogging/exception_notification.rb', line 10

def backtrace
  @backtrace
end

#envObject (readonly)

Returns the value of attribute env.



10
11
12
# File 'lib/justlogging/exception_notification.rb', line 10

def env
  @env
end

#exceptionObject (readonly)

Returns the value of attribute exception.



10
11
12
# File 'lib/justlogging/exception_notification.rb', line 10

def exception
  @exception
end

#kontrollerObject (readonly)

Returns the value of attribute kontroller.



10
11
12
# File 'lib/justlogging/exception_notification.rb', line 10

def kontroller
  @kontroller
end

#requestObject (readonly)

Returns the value of attribute request.



10
11
12
# File 'lib/justlogging/exception_notification.rb', line 10

def request
  @request
end

Instance Method Details

#messageObject



23
24
25
# File 'lib/justlogging/exception_notification.rb', line 23

def message
  @exception.message
end

#nameObject



19
20
21
# File 'lib/justlogging/exception_notification.rb', line 19

def name
  @exception.class.name
end