Skip to content

Instantly share code, notes, and snippets.

@thbar
Created February 13, 2010 21:49
Show Gist options
  • Save thbar/303681 to your computer and use it in GitHub Desktop.
Save thbar/303681 to your computer and use it in GitHub Desktop.
# here's what I used to get HopToad to work with Rails Metal
class Gateway
def self.call(env)
begin
# fake error trigger
if env["PATH_INFO"] =~ /^\/push\/error/
puts "Raising..."
raise "Test error!"
end
# ...
rescue => e
HoptoadNotifier.notify(e, {})
ensure
ActiveRecord::Base.clear_active_connections!
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment