lib/cli: minor consistency changes
parent
7d7ce2ba6b
commit
c9d6cf0b5e
|
@ -144,7 +144,7 @@ namespace CLI {
|
||||||
argumentWaitingForValue = argumentsByShortName[argument[j]];
|
argumentWaitingForValue = argumentsByShortName[argument[j]];
|
||||||
if (i+1 == argc) {
|
if (i+1 == argc) {
|
||||||
this->wrongUsage = true;
|
this->wrongUsage = true;
|
||||||
this->wrongUsageMessages.push_back(std::string("Argument expects value but has none: ")+argument.substr(j, 1));
|
this->wrongUsageMessages.push_back(std::string("Argument expects value but has none: ")+this->argumentsByShortName[argument[j]]->longName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//assume the rest of the argv is a concatenated argument value
|
//assume the rest of the argv is a concatenated argument value
|
||||||
|
@ -171,7 +171,7 @@ namespace CLI {
|
||||||
this->positionalArguments.at(positionalArgumentCounter).value = argument;
|
this->positionalArguments.at(positionalArgumentCounter).value = argument;
|
||||||
} else {
|
} else {
|
||||||
this->wrongUsage = true;
|
this->wrongUsage = true;
|
||||||
this->wrongUsageMessages.push_back(std::string("Too many positional arguments. Unexpected encounter of: ")+argument);
|
this->wrongUsageMessages.push_back(std::string("Too many positional arguments! Unexpected encounter of: ")+argument);
|
||||||
}
|
}
|
||||||
positionalArgumentCounter++;
|
positionalArgumentCounter++;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue