Skip to content

Commit

Permalink
Add README section explaining how to manually notify about an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 committed Jun 24, 2011
1 parent ca04882 commit 24feff3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ In the above case, @document and @person would be made available to the email
renderer, allowing your new section(s) to access and display them. See the
existing sections defined by the plugin for examples of how to write your own.

Manually notify of exception
---

If your controller action manually handles an error, the notifier will never be
run. To manually notify of an error you can do something like the following:

rescue_from Exception, :with => :server_error

def server_error(exception)
# Whatever code that handles the exception

ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver
end

Notification
---

Expand Down

0 comments on commit 24feff3

Please sign in to comment.