diff options
Diffstat (limited to 'src/apps/projinfo.cpp')
| -rw-r--r-- | src/apps/projinfo.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp index 8c266e94..71830f00 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -942,7 +942,13 @@ int main(int argc, char **argv) { } } else if (arg == "--accuracy" && i + 1 < argc) { i++; - minimumAccuracy = c_locale_stod(argv[i]); + try { + minimumAccuracy = c_locale_stod(argv[i]); + } catch (const std::exception &e) { + std::cerr << "Invalid value for option --accuracy: " << e.what() + << std::endl; + usage(); + } } else if (arg == "--area" && i + 1 < argc) { i++; area = argv[i]; |
