mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
don't try to drop XML into the XML output :)
This commit is contained in:
parent
6734035e62
commit
ea8bcdbacd
1 changed files with 9 additions and 2 deletions
|
@ -38,10 +38,17 @@ void printException(std::ostream& stream,
|
|||
const std::string& tag,
|
||||
CppUnitException *e)
|
||||
{
|
||||
stream << "<" << tag << " message='" << e->what() << "'>"
|
||||
std::string msg = e->what();
|
||||
size_t cut = msg.find_first_of("<>'");
|
||||
if(cut != -1)
|
||||
{
|
||||
msg.erase(cut);
|
||||
msg += "...";
|
||||
} // if ...
|
||||
stream << "<" << tag << " message='" << msg << "'><![CDATA["
|
||||
<< "line: " << e->lineNumber() << " "
|
||||
<< e->fileName() << " "
|
||||
<< "'" << e->what() << "'</" << tag << ">";
|
||||
<< "'" << e->what() << "']]></" << tag << ">";
|
||||
} // exception
|
||||
|
||||
void XmlTestResult::print(std::ostream& stream)
|
||||
|
|
Loading…
Reference in a new issue