| 13455 | } |
| 13456 | |
| 13457 | int Session::applyCommandLine( int argc, char const * const * argv ) { |
| 13458 | if( m_startupExceptions ) |
| 13459 | return 1; |
| 13460 | |
| 13461 | auto result = m_cli.parse( clara::Args( argc, argv ) ); |
| 13462 | if( !result ) { |
| 13463 | config(); |
| 13464 | getCurrentMutableContext().setConfig(m_config); |
| 13465 | Catch::cerr() |
| 13466 | << Colour( Colour::Red ) |
| 13467 | << "\nError(s) in input:\n" |
| 13468 | << Column( result.errorMessage() ).indent( 2 ) |
| 13469 | << "\n\n"; |
| 13470 | Catch::cerr() << "Run with -? for usage\n" << std::endl; |
| 13471 | return MaxExitCode; |
| 13472 | } |
| 13473 | |
| 13474 | if( m_configData.showHelp ) |
| 13475 | showHelp(); |
| 13476 | if( m_configData.libIdentify ) |
| 13477 | libIdentify(); |
| 13478 | m_config.reset(); |
| 13479 | return 0; |
| 13480 | } |
| 13481 | |
| 13482 | #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE) |
| 13483 | int Session::applyCommandLine( int argc, wchar_t const * const * argv ) { |