Switch to exception_ptr for async exceptions

This commit is contained in:
badaix 2020-03-12 23:33:10 +01:00
parent 5e508cae2e
commit d49b5c251c
5 changed files with 24 additions and 36 deletions

View file

@ -211,13 +211,10 @@ void ClientConnection::reader()
getNextMessage();
}
}
catch (const std::exception& e)
{
if (messageReceiver_ != nullptr)
messageReceiver_->onException(this, make_shared<SnapException>(e.what()));
}
catch (...)
{
if (messageReceiver_ != nullptr)
messageReceiver_->onException(this, std::current_exception());
}
active_ = false;
}