lib/atom/entry.rb in atom-tools-0.9.4 vs lib/atom/entry.rb in atom-tools-1.0.0

- old
+ new

@@ -64,10 +64,14 @@ if xml.respond_to? :to_atom_entry xml.to_atom_entry(base) elsif xml.respond_to? :read self.parse(xml.read) else - REXML::Document.new(xml.to_s).to_atom_entry(base) + begin + REXML::Document.new(xml.to_s).to_atom_entry(base) + rescue REXML::ParseException + raise Atom::ParseError + end end end def inspect # :nodoc: "#<Atom::Entry id:'#{self.id}'>"