Take out begin rescue in diaspora parser, that's handled in the resque job wrapper
This commit is contained in:
parent
5dca73e535
commit
6b094b2f35
1 changed files with 1 additions and 10 deletions
|
|
@ -7,16 +7,7 @@ module Diaspora
|
||||||
def self.from_xml(xml)
|
def self.from_xml(xml)
|
||||||
doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks }
|
doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks }
|
||||||
return unless body = doc.xpath("/XML/post").children.first
|
return unless body = doc.xpath("/XML/post").children.first
|
||||||
|
body.name.camelize.constantize.from_xml body.to_s
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue