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