Skip to content

Instantly share code, notes, and snippets.

@thoughtbot
Created February 12, 2009 23:47
Show Gist options
  • Save thoughtbot/62952 to your computer and use it in GitHub Desktop.
Save thoughtbot/62952 to your computer and use it in GitHub Desktop.
require 'open-uri'

begin

content = open('http://www.isitchristmas.com/').read

rescue *HTTP_ERRORS => exception

HoptoadNotifier.deliver_exception(exception)

content = 'Christmas is canceled'

end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment