Tools: Improve error message

This commit is contained in:
Shahram Najm 2022-06-15 12:04:07 +01:00
parent 1d9a4b27a1
commit fa7f760a7b
1 changed files with 3 additions and 1 deletions

View File

@ -136,7 +136,9 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
/* Do a very basic sanity check */
const char* str = grib_options_get_option("L:");
if (string_count_char(str, '%') != 2) {
fprintf(stderr, "ERROR: Invalid lats/lons format option \"%s\".\nThe default is: \"%s\"\n",
fprintf(stderr, "ERROR: Invalid lats/lons format option \"%s\".\n"
" The default is: \"%s\"."
" For higher precision, try: \"%%12.6f%%12.6f\"\n",
str, default_format_latlons);
exit(1);
}