mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
fix(CppUnit): TestCase::run(): check if callback is non-empty before calling it
This commit is contained in:
parent
e732c50f96
commit
0930a0db3b
@ -123,7 +123,10 @@ void TestCase::run(TestResult *result, const Test::Callback& callback)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::string msg(TestResult::demangle(typeid(e).name()));
|
||||
msg.append(":\n").append(callback(e));
|
||||
if (callback)
|
||||
{
|
||||
msg.append(": ").append(callback(e));
|
||||
}
|
||||
result->addError(this, new CppUnitException(msg));
|
||||
}
|
||||
catch (...)
|
||||
|
Loading…
Reference in New Issue
Block a user