Skip to content

Commit

Permalink
iox-eclipse-iceoryx#2130 Use 'std::abort' instead of 'std::quick_exit'
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Dec 12, 2023
1 parent 10d4de6 commit c3d6a1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iceoryx_hoofs/cli/include/iox/cli/option_definition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ class OptionDefinition
/// @brief The constructor.
/// @param[in] programDescription The description to the program. Will be printed in the help.
/// @param[in] onFailureCallback callback which is called when parse fails, if nothing is
/// defined std::quick_exit(EXIT_FAILURE) is called
/// defined std::abort() is called
explicit OptionDefinition(
const OptionDescription_t& programDescription,
const function<void()>& onFailureCallback = [] { std::quick_exit(EXIT_FAILURE); }) noexcept;
const function<void()>& onFailureCallback = [] { std::abort(); }) noexcept;

/// @brief Adds a command line switch argument
/// Calls the onFailureCallback when the option was already added or the shortOption and longOption are
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/cli/include/iox/cli_definition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
char** argv, \
const iox::cli::OptionDescription_t& programDescription, \
const uint64_t argcOffset = 1U, \
const ::iox::function<void()>& onFailureCallback = [] { std::quick_exit(EXIT_FAILURE); }) \
const ::iox::function<void()>& onFailureCallback = [] { std::abort(); }) \
{ \
::iox::cli::OptionManager optionManager(programDescription, onFailureCallback); \
return Name(optionManager, argc, argv, argcOffset); \
Expand Down

0 comments on commit c3d6a1c

Please sign in to comment.