Removed handling of start-up exceptions from custom main docs

This commit is contained in:
Phil Nash 2017-11-02 18:01:09 +00:00
parent fe05062f9e
commit 8b40c26434

View File

@ -43,21 +43,6 @@ int main( int argc, char* argv[] )
// writing to session.configData() here sets defaults
// this is the preferred way to set them
// Verify that all tests, aliases, etc registered properly
const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions();
if ( !exceptions.empty() ) {
// iterate over all exceptions and notify user
for ( const auto& ex_ptr : exceptions ) {
try {
std::rethrow_exception(ex_ptr);
} catch (std::exception const& ex) {
Catch::cerr() << ex.what();
}
}
// Indicate that an error occured before main
return 1;
}
int returnCode = session.applyCommandLine( argc, argv );
if( returnCode != 0 ) // Indicates a command line error
return returnCode;
@ -67,6 +52,7 @@ int main( int argc, char* argv[] )
// only do this if you know you need to
int numFailed = session.run();
// numFailed is clamped to 255 as some unices only use the lower 8 bits.
// This clamping has already been applied, so just return it here
// You can also do any post run clean-up here