MCPcopy Create free account
hub / github.com/apache/thrift / applyCommandLine

Method applyCommandLine

compiler/cpp/tests/catch/catch.hpp:7021–7041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7019 }
7020
7021 int applyCommandLine( int argc, char const* const* const argv, OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
7022 try {
7023 m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
7024 m_unusedTokens = m_cli.parseInto( Clara::argsToVector( argc, argv ), m_configData );
7025 if( m_configData.showHelp )
7026 showHelp( m_configData.processName );
7027 m_config.reset();
7028 }
7029 catch( std::exception& ex ) {
7030 {
7031 Colour colourGuard( Colour::Red );
7032 Catch::cerr()
7033 << "\nError(s) in input:\n"
7034 << Text( ex.what(), TextAttributes().setIndent(2) )
7035 << "\n\n";
7036 }
7037 m_cli.usage( Catch::cout(), m_configData.processName );
7038 return (std::numeric_limits<int>::max)();
7039 }
7040 return 0;
7041 }
7042
7043 void useConfigData( ConfigData const& _configData ) {
7044 m_configData = _configData;

Callers

nothing calls this directly

Calls 7

argsToVectorFunction · 0.85
TextClass · 0.85
TextAttributesClass · 0.85
parseIntoMethod · 0.80
usageMethod · 0.80
resetMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected