From c04c9b22528b71f23d045d1813b66dc74fca6221 Mon Sep 17 00:00:00 2001 From: Christian Asmussen Date: Tue, 12 Mar 2024 12:43:38 -0400 Subject: [PATCH] Fixed app.set_failure_message(...) -> app.failure_message(...) (#1018) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- book/chapters/subcommands.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/book/chapters/subcommands.md b/book/chapters/subcommands.md index a2124e8c..7a0c41c7 100644 --- a/book/chapters/subcommands.md +++ b/book/chapters/subcommands.md @@ -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