From 6b094b2f35caa4c31ceda75d7750c73b53db44cf Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Mon, 23 May 2011 15:39:42 -0700 Subject: [PATCH] Take out begin rescue in diaspora parser, that's handled in the resque job wrapper --- lib/diaspora/parser.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/diaspora/parser.rb b/lib/diaspora/parser.rb index da3344d84..ca8579eee 100644 --- a/lib/diaspora/parser.rb +++ b/lib/diaspora/parser.rb @@ -7,16 +7,7 @@ module Diaspora def self.from_xml(xml) doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks } return unless body = doc.xpath("/XML/post").children.first - - begin - new_object = body.name.camelize.constantize.from_xml body.to_s - return new_object - rescue NameError => e - if e.message.include? 'wrong constant name' - Rails.logger.info "Not a real type: #{object.to_s}" - end - raise e - end + body.name.camelize.constantize.from_xml body.to_s end end end