X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c3785ff278f605fc6c98ac0bdcd3dc3c79de05a4..6e98e324e58f67b62c6abf343d60ae5e6f22f9eb:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index e1ad818dd..b2650b61d 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -71,8 +71,8 @@ class Node < ActiveRecord::Base doc.find('//osm/node').each do |pt| return Node.from_xml_node(pt, create) end - rescue - return nil + rescue LibXML::XML::Error => ex + raise OSM::APIBadXMLError.new("node", xml, ex.message) end end @@ -274,7 +274,7 @@ class Node < ActiveRecord::Base # duplicate tags are now forbidden, so we can't allow values # in the hash to be overwritten. - raise OSM::APIDuplicateTagsError.new if @tags.include? k + raise OSM::APIDuplicateTagsError.new("node", self.id, k) if @tags.include? k @tags[k] = v end