Use macros from cstdlib instead of hard-coding exit codes
This commit is contained in:
parent
c931e2d928
commit
cf510f0397
|
@ -941,7 +941,7 @@ void ArgumentParser::parseArgs(int argc, const char *const *argv, ParseArgumentB
|
||||||
if (behavior & ParseArgumentBehavior::ExitOnFailure) {
|
if (behavior & ParseArgumentBehavior::ExitOnFailure) {
|
||||||
CMD_UTILS_START_CONSOLE;
|
CMD_UTILS_START_CONSOLE;
|
||||||
cerr << failure;
|
cerr << failure;
|
||||||
invokeExit(1);
|
invokeExit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
@ -1016,7 +1016,7 @@ void ArgumentParser::readArgs(int argc, const char *const *argv)
|
||||||
// print Bash completion and prevent the application to continue with the regular execution
|
// print Bash completion and prevent the application to continue with the regular execution
|
||||||
if (completionMode) {
|
if (completionMode) {
|
||||||
printBashCompletion(argc, argv, currentWordIndex, reader);
|
printBashCompletion(argc, argv, currentWordIndex, reader);
|
||||||
invokeExit(0);
|
invokeExit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue