Skip to content

Instantly share code, notes, and snippets.

@mkelley33
Created June 29, 2012 19:44
Show Gist options
  • Save mkelley33/3020226 to your computer and use it in GitHub Desktop.
Save mkelley33/3020226 to your computer and use it in GitHub Desktop.
Catch Exceptions
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