mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 01:18:02 +00:00
parent
d07999ddff
commit
f64d914bff
1 changed files with 7 additions and 11 deletions
|
@ -38,17 +38,13 @@ namespace Catch {
|
|||
}
|
||||
inline void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {
|
||||
if( isReservedTag( tag ) ) {
|
||||
{
|
||||
Colour colourGuard( Colour::Red );
|
||||
Catch::cerr()
|
||||
<< "Tag name [" << tag << "] not allowed.\n"
|
||||
<< "Tag names starting with non alpha-numeric characters are reserved\n";
|
||||
}
|
||||
{
|
||||
Colour colourGuard( Colour::FileName );
|
||||
Catch::cerr() << _lineInfo << std::endl;
|
||||
}
|
||||
exit(1);
|
||||
std::ostringstream ss;
|
||||
ss << Colour(Colour::Red)
|
||||
<< "Tag name [" << tag << "] not allowed.\n"
|
||||
<< "Tag names starting with non alpha-numeric characters are reserved\n"
|
||||
<< Colour(Colour::FileName)
|
||||
<< _lineInfo << '\n';
|
||||
throw std::runtime_error(ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue