@@ -84,8 +84,8 @@ const struct option long_options[] = {
8484
8585void short_usage (char *arg0)
8686{
87- throw std::runtime_error{" Usage error. For further information see: \n "
88- " \t {} -h|-- help\n " _format (program_name (arg0))};
87+ throw std::runtime_error{" Usage error. For further information call: "
88+ " {} -- help" _format (program_name (arg0))};
8989}
9090
9191void long_usage (char const *arg0, bool verbose)
@@ -332,17 +332,17 @@ static osmium::Box parse_bbox(char const *bbox)
332332 int const n = sscanf (bbox, " %lf,%lf,%lf,%lf" , &minx, &miny, &maxx, &maxy);
333333 if (n != 4 ) {
334334 throw std::runtime_error{" Bounding box must be specified like: "
335- " minlon,minlat,maxlon,maxlat\n " };
335+ " minlon,minlat,maxlon,maxlat. " };
336336 }
337337
338338 if (maxx <= minx) {
339339 throw std::runtime_error{
340- " Bounding box failed due to maxlon <= minlon\n " };
340+ " Bounding box failed due to maxlon <= minlon. " };
341341 }
342342
343343 if (maxy <= miny) {
344344 throw std::runtime_error{
345- " Bounding box failed due to maxlat <= minlat\n " };
345+ " Bounding box failed due to maxlat <= minlat. " };
346346 }
347347
348348 fmt::print (stderr, " Applying Bounding box: {},{} to {},{}\n " , minx, miny,
@@ -442,7 +442,7 @@ options_t::options_t(int argc, char *argv[]) : options_t()
442442 if (!optarg || optarg[0 ] == ' -' ) {
443443 throw std::runtime_error{
444444 " Missing argument for option --expire-tiles. Zoom "
445- " levels must be positive.\n " };
445+ " levels must be positive." };
446446 }
447447 char *next_char;
448448 expire_tiles_zoom_min =
@@ -451,7 +451,7 @@ options_t::options_t(int argc, char *argv[]) : options_t()
451451 throw std::runtime_error{
452452 " Bad argument for option --expire-tiles. "
453453 " Minimum zoom level must be larger "
454- " than 0.\n " };
454+ " than 0." };
455455 }
456456 // The first character after the number is ignored because that is the separating hyphen.
457457 if (*next_char == ' -' ) {
@@ -463,19 +463,19 @@ options_t::options_t(int argc, char *argv[]) : options_t()
463463 std::strtoul (next_char, &after_maxzoom, 10 ));
464464 if (expire_tiles_zoom == 0 || *after_maxzoom != ' \0 ' ) {
465465 throw std::runtime_error{" Invalid maximum zoom level "
466- " given for tile expiry.\n " };
466+ " given for tile expiry." };
467467 }
468468 } else {
469469 throw std::runtime_error{
470- " Invalid maximum zoom level given for tile expiry.\n " };
470+ " Invalid maximum zoom level given for tile expiry." };
471471 }
472472 } else if (*next_char == ' \0 ' ) {
473473 // end of string, no second zoom level given
474474 expire_tiles_zoom = expire_tiles_zoom_min;
475475 } else {
476476 throw std::runtime_error{" Minimum and maximum zoom level for "
477477 " tile expiry must be separated by "
478- " '-'.\n " };
478+ " '-'." };
479479 }
480480 break ;
481481 case ' o' :
@@ -498,7 +498,7 @@ options_t::options_t(int argc, char *argv[]) : options_t()
498498 case ' k' :
499499 if (hstore_mode != hstore_column::none) {
500500 throw std::runtime_error{" You can not specify both --hstore "
501- " (-k) and --hstore-all (-j)\n " };
501+ " (-k) and --hstore-all (-j). " };
502502 }
503503 hstore_mode = hstore_column::norm;
504504 break ;
@@ -508,7 +508,7 @@ options_t::options_t(int argc, char *argv[]) : options_t()
508508 case ' j' :
509509 if (hstore_mode != hstore_column::none) {
510510 throw std::runtime_error{" You can not specify both --hstore "
511- " (-k) and --hstore-all (-j)\n " };
511+ " (-k) and --hstore-all (-j). " };
512512 }
513513 hstore_mode = hstore_column::all;
514514 break ;
@@ -540,7 +540,7 @@ options_t::options_t(int argc, char *argv[]) : options_t()
540540 alloc_chunkwise = ALLOC_DENSE | ALLOC_SPARSE;
541541 } else {
542542 throw std::runtime_error{
543- " Unrecognized cache strategy {}.\n " _format (optarg)};
543+ " Unrecognized cache strategy {}." _format (optarg)};
544544 }
545545 break ;
546546 case 205 :
@@ -627,15 +627,15 @@ void options_t::check_options()
627627{
628628 if (append && create) {
629629 throw std::runtime_error{" --append and --create options can not be "
630- " used at the same time!\n " };
630+ " used at the same time!" };
631631 }
632632
633633 if (append && !slim) {
634- throw std::runtime_error{" --append can only be used with slim mode!\n " };
634+ throw std::runtime_error{" --append can only be used with slim mode!" };
635635 }
636636
637637 if (droptemp && !slim) {
638- throw std::runtime_error{" --drop only makes sense with --slim.\n " };
638+ throw std::runtime_error{" --drop only makes sense with --slim." };
639639 }
640640
641641 if (hstore_mode == hstore_column::none && hstore_columns.empty () &&
@@ -662,7 +662,7 @@ void options_t::check_options()
662662 if (cache == 0 ) {
663663 if (!slim) {
664664 throw std::runtime_error{
665- " Ram node cache can only be disable in slim mode.\n " };
665+ " Ram node cache can only be disable in slim mode." };
666666 }
667667 if (!flat_node_cache_enabled) {
668668 fprintf (stderr, " WARNING: ram cache is disabled. This will likely "
0 commit comments