diff options
author | Seb Bacon <seb@mysociety.org> | 2012-01-09 11:13:47 +0000 |
---|---|---|
committer | Seb Bacon <seb@mysociety.org> | 2012-01-09 11:13:47 +0000 |
commit | daf39e2287067b0fde275f674a5503dde7349b06 (patch) | |
tree | dbc05e7fbd46924d28cccadc0b1639d5cd6f054f /app/controllers/application_controller.rb | |
parent | 848483381694e67999e446d3784b0c32dfdc3f8d (diff) |
Send email notifications on exceptions
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b7457c48e..e30a7330e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,7 +14,10 @@ class ApplicationController < ActionController::Base # Standard headers, footers and navigation for whole site layout "default" include FastGettext::Translation # make functions like _, n_, N_ etc available) - + + # Send notification email on exceptions + include ExceptionNotification::Notifiable + # Note: a filter stops the chain if it redirects or renders something before_filter :authentication_check before_filter :set_gettext_locale @@ -119,6 +122,7 @@ class ApplicationController < ActionController::Base @status = 404 else @status = 500 + notify_about_exception exception end # Display user appropriate error message @exception_backtrace = exception.backtrace.join("\n") |