mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Extend exception type in _THROWS_ with const& unconditionally
Potentially breaking change, but most people apparently were using it wrong and thus it won't be breaking for them. Closes #955
This commit is contained in:
		| @@ -130,7 +130,7 @@ | |||||||
|                 static_cast<void>(expr); \ |                 static_cast<void>(expr); \ | ||||||
|                 __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ |                 __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ | ||||||
|             } \ |             } \ | ||||||
|             catch( exceptionType ) { \ |             catch( exceptionType const& ) { \ | ||||||
|                 __catchResult.captureResult( Catch::ResultWas::Ok ); \ |                 __catchResult.captureResult( Catch::ResultWas::Ok ); \ | ||||||
|             } \ |             } \ | ||||||
|             catch( ... ) { \ |             catch( ... ) { \ | ||||||
| @@ -194,7 +194,7 @@ | |||||||
|                 static_cast<void>(expr); \ |                 static_cast<void>(expr); \ | ||||||
|                 __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ |                 __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ | ||||||
|             } \ |             } \ | ||||||
|             catch( exceptionType ex ) { \ |             catch( exceptionType const& ex ) { \ | ||||||
|                 __catchResult.captureMatch( ex, matcher, #matcher ); \ |                 __catchResult.captureMatch( ex, matcher, #matcher ); \ | ||||||
|             } \ |             } \ | ||||||
|             catch( ... ) { \ |             catch( ... ) { \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský