X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ec916b7429ec04731eb5c533c55915f627c9aa38..86b4d1bc2c05a68053c7485217144a7fcf8ef4e8:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index bd9351026..a8cb103d2 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -24,6 +24,15 @@ module OSM class APIAlreadyDeletedError < APIError end + # Raised when the provided version is not equal to the latest in the db. + class APIVersionMismatchError < APIError + def initialize(provided, latest) + @provided, @latest = provided, latest + end + + attr_reader :provided, :latest + end + # Helper methods for going to/from mercator and lat/lng. class Mercator include Math