# low, second is high - same as with bounding boxes.
# check that we actually have 2 elements in the array
- times = time.split(/,/)
+ times = time.split(",")
raise OSM::APIBadUserInput, "bad time range" if times.size != 2
from, to = times.collect { |t| Time.parse(t) }
end
# stupid Time seems to throw both of these for bad parsing, so
# we have to catch both and ensure the correct code path is taken.
- rescue ArgumentError => e
- raise OSM::APIBadUserInput, e.message.to_s
- rescue RuntimeError => e
+ rescue ArgumentError, RuntimeError => e
raise OSM::APIBadUserInput, e.message.to_s
end