Use macros from cstdlib instead of hard-coding exit codes

This commit is contained in:
Martchus 2022-05-21 12:37:36 +02:00
parent c931e2d928
commit cf510f0397
1 changed files with 2 additions and 2 deletions

View File

@ -941,7 +941,7 @@ void ArgumentParser::parseArgs(int argc, const char *const *argv, ParseArgumentB
if (behavior & ParseArgumentBehavior::ExitOnFailure) {
CMD_UTILS_START_CONSOLE;
cerr << failure;
invokeExit(1);
invokeExit(EXIT_FAILURE);
}
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
if (completionMode) {
printBashCompletion(argc, argv, currentWordIndex, reader);
invokeExit(0);
invokeExit(EXIT_SUCCESS);
}
}