Module: ExceptIO::Hooks::Rails3Plus

Defined in:
lib/exceptio/hooks.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



15
16
17
# File 'lib/exceptio/hooks.rb', line 15

def self.included(klass)
  klass.rescue_from Exception, :with => :rescue_to_exceptio
end

Instance Method Details

#rescue_to_exceptio(exception = nil) ⇒ Object



10
11
12
13
# File 'lib/exceptio/hooks.rb', line 10

def rescue_to_exceptio(exception = nil)
  ExceptIO::Client.log(exception, Rails.env, params, session, request.url)
  raise exception
end