Skip to content

Instantly share code, notes, and snippets.

@Fivell
Created December 16, 2013 23:17
Show Gist options
  • Select an option

  • Save Fivell/7996592 to your computer and use it in GitHub Desktop.

Select an option

Save Fivell/7996592 to your computer and use it in GitHub Desktop.
EmailExceptionNotification module
module EmailExceptionNotification
def self.included(base)
base.rescue_from StandardError, :with => :handle_exceptions
end
def handle_exceptions(e)
deliver_exception(e)
raise e
end
def deliver_exception(e)
ErrorMail.error(e, self.request).deliver
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment