assertMsg << err; \
clear_openssl_errors(); \
} \
- DPL::Test::TestFailed e(#test, \
+ DPL::Test::TestFailed e(#test, __FILE__, __LINE__, assertMsg.str()); \
+ if (!std::uncaught_exception()) \
+ throw e; \
+ DPL::Test::TestRunnerSingleton::Instance().addFailReason(e.GetMessage()); \
+ } else if (!get_openssl_errors().empty()) { \
+ std::ostringstream failMsg; \
+ failMsg << DPL::gdbbacktrace(); \
+ failMsg << std::endl << "OPENSSL ERRORS:" << std::endl; \
+ for (auto &err : get_openssl_errors()) \
+ failMsg << err; \
+ clear_openssl_errors(); \
+ DPL::Test::TestFailed e("Unhandled OpenSSL error", \
__FILE__, \
__LINE__, \
- assertMsg.str()); \
+ failMsg.str()); \
if (!std::uncaught_exception()) \
throw e; \
DPL::Test::TestRunnerSingleton::Instance().addFailReason(e.GetMessage()); \