X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c8ee1351049ef1bb4d7b50d071b2a96154266d1d..3e9b6845d34f9cd80f9eb1099f76f7801bfae76f:/lib/diff_reader.rb diff --git a/lib/diff_reader.rb b/lib/diff_reader.rb index 217e9309d..be48f8b4e 100644 --- a/lib/diff_reader.rb +++ b/lib/diff_reader.rb @@ -72,8 +72,8 @@ class DiffReader def with_model with_element do |model_name| model = MODELS[model_name] - raise "Unexpected element type #{model_name}, " + - "expected node, way, relation." if model.nil? + raise OSM::APIBadUserInput.new("Unexpected element type #{model_name}, " + + "expected node, way or relation.") if model.nil? yield model, @reader.expand @reader.next end @@ -130,7 +130,7 @@ class DiffReader # some elements may have placeholders for other elements in the # diff, so we must fix these before saving the element. - new.fix_placeholders!(ids) + new.fix_placeholders!(ids, placeholder_id) # create element given user new.create_with_history(@changeset.user)