]> git.openstreetmap.org Git - rails.git/commitdiff
Shut up libxml's "Must specify a string with one or more characters" error on relatio...
authorThomas Wood <grand.edgemaster@gmail.com>
Mon, 23 Mar 2009 21:52:32 +0000 (21:52 +0000)
committerThomas Wood <grand.edgemaster@gmail.com>
Mon, 23 Mar 2009 21:52:32 +0000 (21:52 +0000)
app/models/relation.rb
app/models/way.rb

index 64af4ecc1eb9d59eff27e8b46d292f3a2aa560f6..c3769b14d68e2a126d2f54002e746127bc61d80d 100644 (file)
@@ -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
index dbc1197a9e039ec003b1e623e92bdf97e9c1faf2..88bbaf6c59669229dfb221659389cf1605442d22 100644 (file)
@@ -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