Module: RocketPants::Rescuable::ClassMethods

Defined in:
lib/rocket_pants/controller/rescuable.rb

Instance Method Summary collapse

Instance Method Details

#use_named_exception_notifier(name) ⇒ Object

Tells rocketpants to use the given exception handler to deal with errors. E.g. use_named_exception_notifier :airbrake

Parameters:

  • name (Symbol)

    the name of the exception handler to use.



41
42
43
44
# File 'lib/rocket_pants/controller/rescuable.rb', line 41

def use_named_exception_notifier(name)
  handler = NAMED_NOTIFIER_CALLBACKS.fetch(name, DEFAULT_NOTIFIER_CALLBACK)
  self.exception_notifier_callback = handler
end