mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Added nothrow command line option
Causes _THROWS family of macros to no evaluate expression
This commit is contained in:
parent
e20b252b5a
commit
46a3476731
9 changed files with 107 additions and 32 deletions
|
@ -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() );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue