mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 05:59:24 +00:00
Removed use of compiler specific techniques for denoting non-returning functions
- use if( Catch::isTrue( true) ) to guard throws instead
This commit is contained in:
parent
2a9d8d9e36
commit
bf37e6879a
6 changed files with 35 additions and 56 deletions
|
@ -44,7 +44,6 @@ namespace Catch {
|
|||
std::string operator[]( std::size_t i ) const { return m_args[i]; }
|
||||
std::size_t argsCount() const { return m_args.size(); }
|
||||
|
||||
CATCH_ATTRIBUTE_NORETURN
|
||||
void raiseError( std::string const& message ) const {
|
||||
std::ostringstream oss;
|
||||
if( m_name.empty() )
|
||||
|
@ -56,7 +55,8 @@ namespace Catch {
|
|||
oss << " Arguments were:";
|
||||
for( std::size_t i = 0; i < m_args.size(); ++i )
|
||||
oss << " " << m_args[i];
|
||||
throw std::domain_error( oss.str() );
|
||||
if( isTrue( true ) )
|
||||
throw std::domain_error( oss.str() );
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue