From f8eee83515032eca5e50d668ced44194eac6e36e Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 6 Jan 2022 09:51:34 -0500 Subject: Expose QPDFArgParser::usage --- include/qpdf/QPDFArgParser.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/qpdf/QPDFArgParser.hh b/include/qpdf/QPDFArgParser.hh index e5b2c490..24e6ac48 100644 --- a/include/qpdf/QPDFArgParser.hh +++ b/include/qpdf/QPDFArgParser.hh @@ -150,6 +150,12 @@ class QPDFArgParser QPDF_DLL void insertCompletion(std::string const&); + // Throw a Usage exception with the given message. In completion + // mode, this just exits to prevent errors from partial commands + // or other error messages from messing up completion. + QPDF_DLL + void usage(std::string const& message); + private: struct OptionEntry { @@ -174,7 +180,6 @@ class QPDFArgParser void argCompletionBash(); void argCompletionZsh(); - void usage(std::string const& message); void checkCompletion(); void handleArgFileArguments(); void handleBashArguments(); -- cgit v1.2.3-70-g09d2