Module: Sunspot::Rails::Failover::ExceptionHandlerAdapter

Defined in:
lib/sunspot-rails-failover/exception_handler_adapter.rb

Class Method Summary collapse

Class Method Details

.exception_handlerObject



15
16
17
# File 'lib/sunspot-rails-failover/exception_handler_adapter.rb', line 15

def self.exception_handler
  Failover.exception_handler
end

.handle(exception) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/sunspot-rails-failover/exception_handler_adapter.rb', line 6

def self.handle(exception)
  case exception_handler
  when :hoptoad, nil
    HoptoadNotifier.notify(exception) if defined?(HoptoadNotifier)  
  when Class
    exception_handler.handle(exception)
  end
end