Skip to content

Commit

Permalink
Fixed app.set_failure_message(...) -> app.failure_message(...) (#1018)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
krico and pre-commit-ci[bot] authored Mar 12, 2024
1 parent 852fc94 commit c04c9b2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions book/chapters/subcommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ can do with an `App`, however.

You are given a lot of control the help output. You can set a footer with
`app.footer("My Footer")`. You can replace the default help print when a
`ParseError` is thrown with
`app.set_failure_message(CLI::FailureMessage::help)`. The default is
`CLI:::FailureMessage::simple`, and you can easily define a new one. Just make a
(lambda) function that takes an App pointer and a reference to an error code
(even if you don't use them), and returns a string.
`ParseError` is thrown with `app.failure_message(CLI::FailureMessage::help)`.
The default is `CLI:::FailureMessage::simple`, and you can easily define a new
one. Just make a (lambda) function that takes an App pointer and a reference to
an error code (even if you don't use them), and returns a string.

## Adding a subcommand

Expand Down

0 comments on commit c04c9b2

Please sign in to comment.