Created
June 29, 2012 19:44
-
-
Save mkelley33/3020226 to your computer and use it in GitHub Desktop.
Catch Exceptions
This file contains 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
ActiveSupport::Notifications.subscribe "process_action.action_controller" do |name, start, finish, id, payload| | |
if payload[:exception] | |
name, message = *payload[:exception] | |
Uhoh::Failure.create!(:message => message) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment