Take out begin rescue in diaspora parser, that's handled in the resque job wrapper

This commit is contained in:
Raphael Sofaer 2011-05-23 15:39:42 -07:00
parent 5dca73e535
commit 6b094b2f35

View file

@ -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