Added nothrow command line option

Causes _THROWS family of macros to no evaluate expression
This commit is contained in:
Phil Nash 2012-06-05 20:50:47 +01:00
parent e20b252b5a
commit 46a3476731
9 changed files with 107 additions and 32 deletions

View file

@ -174,6 +174,13 @@ namespace Catch {
}
config.setCutoff( threshold );
}
if( Command cmd = parser.find( "-nt", "--nothrow" ) ) {
if( cmd.argsCount() != 0 )
cmd.raiseError( "Does not accept arguments" );
config.setAllowThrows( false );
}
}
catch( std::exception& ex ) {
config.setError( ex.what() );