From: Thomas Wood Date: Mon, 23 Mar 2009 21:52:32 +0000 (+0000) Subject: Shut up libxml's "Must specify a string with one or more characters" error on relatio... X-Git-Tag: live~7573^2~49 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6167bb650286e30cf9e1beed107b794c03bb3909 Shut up libxml's "Must specify a string with one or more characters" error on relation and way models. --- diff --git a/app/models/relation.rb b/app/models/relation.rb index 64af4ecc1..c3769b14d 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -33,7 +33,7 @@ class Relation < ActiveRecord::Base doc.find('//osm/relation').each do |pt| return Relation.from_xml_node(pt, create) end - rescue LibXML::XML::Error => ex + rescue LibXML::XML::Error, ArgumentError => ex raise OSM::APIBadXMLError.new("relation", xml, ex.message) end end diff --git a/app/models/way.rb b/app/models/way.rb index dbc1197a9..88bbaf6c5 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -33,7 +33,7 @@ class Way < ActiveRecord::Base doc.find('//osm/way').each do |pt| return Way.from_xml_node(pt, create) end - rescue LibXML::XML::Error => ex + rescue LibXML::XML::Error, ArgumentError => ex raise OSM::APIBadXMLError.new("way", xml, ex.message) end end