Skip to content

Commit

Permalink
Tweak error docs, do not catch ArgsError separately, because std::exc…
Browse files Browse the repository at this point in the history
…eption block does the same thing.
  • Loading branch information
ryouze committed Sep 25, 2024
1 parent 69dacab commit 5e0dd65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace core::args {

/**
* @brief Exceptions raised by command-line argument parser when help or version is requested. The requested message is returned.
* @brief Exceptions raised by command-line argument parser when an error occurs. A help message with usage, description, and examples is included.
*
* This class extends "std::runtime_error".
*
Expand Down
5 changes: 0 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ int main(int argc,
// Pass parsed command-line arguments to the application
app::run(core::args::Args(argc, argv));
}
catch (const core::args::ArgsError &e) {
// Failed to parse command-line arguments
fmt::print("{}\n", e.what());
return EXIT_SUCCESS;
}
catch (const std::exception &e) {
fmt::print(stderr, "{}\n", e.what());
return EXIT_FAILURE;
Expand Down

0 comments on commit 5e0dd65

Please sign in to comment.