{"issue":{"created_at":"2011-12-01T08:10:11Z","state":"closed","updated_at":"2011-12-15T15:23:29Z","user":{"gravatar_id":"da30ad285b0d9217227f6d80ad01dcca","id":24643,"url":"https://api.github.com/users/tokland","avatar_url":"https://secure.gravatar.com/avatar/da30ad285b0d9217227f6d80ad01dcca?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"tokland"},"comments":3,"body":"While testing the gem I had a network problem and I was surprised to see that *videos_by* continued \"working\", but returning empty objects. I checked the code and the problem seems to be here:\r\n\r\nhttps://github.com/kylejginavan/youtube_it/blob/master/lib/youtube_it/parser.rb#L9\r\n\r\n    class FeedParser #:nodoc:\r\n      def initialize(content)\r\n        @content = open(content).read        \r\n      rescue OpenURI::HTTPError => e\r\n        raise OpenURI::HTTPError.new(e.io.status[0],e)\r\n      rescue\r\n        @content = content\r\n      end \r\n\r\nI don't understand the details of the first rescue but I guess for some reason it's important to re-raise it with different parameters. But the second *rescue* makes no sense to me, since it assigns *content* (a url, why is it called *content*?) to *@content* (the expected body response)? why don't leave the method raise the exception and let the caller decide how to handle it?\r\n","assignee":null,"id":2412127,"number":37,"labels":[{"name":"1","color":"e10c02","url":"https://api.github.com/repos/kylejginavan/youtube_it/labels/1"}],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"FeedParser exception handling","html_url":"https://github.com/kylejginavan/youtube_it/issues/37","closed_at":"2011-12-15T15:23:29Z","milestone":null,"url":"https://api.github.com/repos/kylejginavan/youtube_it/issues/37"},"action":"closed"}