[Tile-serving] [openstreetmap/osm2pgsql] Fix parsing of command line option "-e 12" (no expiry maxzoom given) (#832)

Sarah Hoffmann notifications at github.com
Fri Mar 23 12:18:13 UTC 2018


lonvia commented on this pull request.



> @@ -385,8 +387,9 @@ options_t::options_t(int argc, char *argv[]): options_t()
             expire_tiles_zoom_min =
                 static_cast<uint32_t>(std::strtoul(optarg, &next_char, 10));
             if (expire_tiles_zoom_min == 0) {
-                throw std::runtime_error(
-                    "Missing zoom level for tile expiry.\n");
+                throw std::runtime_error("Missing zoom level for tile expiry. "
+                                         "Minimum zoom level must be larger "
+                                         "than 0.\n");

I'd remove the 'Missing zoom level' part entirely or rename it to 'Bad argument for...'. As is, it seems misleading given that we have checked a couple of lines above that there is an optarg.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/832#pullrequestreview-106470775
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20180323/e7f449c1/attachment.html>


More information about the Tile-serving mailing list