Fix thread destruction in TestPeer and better exception reporting

This commit is contained in:
Vinnie Falco
2013-08-17 07:44:22 -07:00
parent d959af430e
commit 503b8047b1
3 changed files with 34 additions and 0 deletions

View File

@@ -30,6 +30,13 @@ PeerTest::Result::Result (boost::system::error_code const& ec, String const& pre
{
}
PeerTest::Result::Result (std::exception const& e, String const& prefix)
: m_ec (TestPeerBasics::make_error (TestPeerBasics::errc::exceptioned))
, m_message ((prefix == String::empty) ? e.what ()
: prefix + ": " + e.what ())
{
}
bool PeerTest::Result::operator== (Result const& other) const noexcept
{
return m_ec == other.m_ec;