X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c3785ff278f605fc6c98ac0bdcd3dc3c79de05a4..6e98e324e58f67b62c6abf343d60ae5e6f22f9eb:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index 2071fd559..d4bca19aa 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -34,8 +34,8 @@ class Way < ActiveRecord::Base doc.find('//osm/way').each do |pt| return Way.from_xml_node(pt, create) end - rescue - return nil + rescue LibXML::XML::Error => ex + raise OSM::APIBadXMLError.new("relation", xml, ex.message) end end @@ -182,7 +182,7 @@ class Way < 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("way", self.id, k) if @tags.include? k @tags[k] = v end