diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-31 10:40:07 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-31 10:40:07 +0100 |
commit | fbaa73bfc7c61bbe9e3c9d6077a46d758ae12a9f (patch) | |
tree | 7147766dc56cf1edd2fa7e98740dcdc6b15f082a | |
parent | 01e3a7a8cd6b7da78bc7bfc883b9b04c328ea2e6 (diff) |
Prefix program arguments error with error:
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index b37f9e1..994ddef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3072,17 +3072,17 @@ int main(int argc, char **argv) { for(int i = 1; i < argc; i += 2) { auto it = args.find(argv[i]); if(it == args.end()) { - fprintf(stderr, "Invalid argument '%s'\n", argv[i]); + fprintf(stderr, "Error: invalid argument '%s'\n", argv[i]); usage(); } if(!it->second.values.empty() && !it->second.list) { - fprintf(stderr, "Expected argument '%s' to only be specified once\n", argv[i]); + fprintf(stderr, "Error: expected argument '%s' to only be specified once\n", argv[i]); usage(); } if(i + 1 >= argc) { - fprintf(stderr, "Missing value for argument '%s'\n", argv[i]); + fprintf(stderr, "Error: missing value for argument '%s'\n", argv[i]); usage(); } @@ -3091,7 +3091,7 @@ int main(int argc, char **argv) { for(auto &it : args) { if(!it.second.optional && !it.second.value()) { - fprintf(stderr, "Missing argument '%s'\n", it.first.c_str()); + fprintf(stderr, "Error: missing argument '%s'\n", it.first.c_str()); usage(); } } |