Created
January 14, 2014 14:31
-
-
Save Fivell/8419154 to your computer and use it in GitHub Desktop.
exeption notification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rescue_from StandardError, :with => :notify_exception | |
| def notify_exception(e) | |
| ActionMailer::Base.mail(:from => "[email protected]", :to => "[email protected]", | |
| :subject => e.message, | |
| :body => [e.backtrace.join("\n"), self.request.inspect].join("\n\n\n")).deliver | |
| raise e | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment