Class: Loggr::Catcher

Inherits:
Object
  • Object
show all
Defined in:
lib/loggr-rb/catcher.rb

Class Method Summary collapse

Class Method Details

.handle(exception, request = nil) ⇒ Object



16
17
18
19
20
# File 'lib/loggr-rb/catcher.rb', line 16

def handle(exception, request=nil)
  if Config.should_send_to_api?
    Loggr::Events.create_from_exception(exception, request).post()
  end
end

.handle_with_controller(exception, controller = nil, request = nil) ⇒ Object



4
5
6
7
8
# File 'lib/loggr-rb/catcher.rb', line 4

def handle_with_controller(exception, controller=nil, request=nil)
  if Config.should_send_to_api?
		  Loggr::Events.create_from_exception(exception, request).post()
  end
end

.handle_with_rack(exception, environment, request) ⇒ Object



10
11
12
13
14
# File 'lib/loggr-rb/catcher.rb', line 10

def handle_with_rack(exception, environment, request) 
  if Config.should_send_to_api?
		  Loggr::Events.create_from_exception(exception, request).post()
  end
end