| 13356 | } |
| 13357 | |
| 13358 | int Session::applyCommandLine( int argc, char const * const * argv ) { |
| 13359 | if( m_startupExceptions ) |
| 13360 | return 1; |
| 13361 | |
| 13362 | auto result = m_cli.parse( clara::Args( argc, argv ) ); |
| 13363 | if( !result ) { |
| 13364 | config(); |
| 13365 | getCurrentMutableContext().setConfig(m_config); |
| 13366 | Catch::cerr() |
| 13367 | << Colour( Colour::Red ) |
| 13368 | << "\nError(s) in input:\n" |
| 13369 | << Column( result.errorMessage() ).indent( 2 ) |
| 13370 | << "\n\n"; |
| 13371 | Catch::cerr() << "Run with -? for usage\n" << std::endl; |
| 13372 | return MaxExitCode; |
| 13373 | } |
| 13374 | |
| 13375 | if( m_configData.showHelp ) |
| 13376 | showHelp(); |
| 13377 | if( m_configData.libIdentify ) |
| 13378 | libIdentify(); |
| 13379 | m_config.reset(); |
| 13380 | return 0; |
| 13381 | } |
| 13382 | |
| 13383 | #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE) |
| 13384 | int Session::applyCommandLine( int argc, wchar_t const * const * argv ) { |