mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Report more information on exception
This commit is contained in:
parent
22d51bd473
commit
00728ded88
@ -92,7 +92,7 @@ void NetworkConnection::onPacketReceived(const boost::system::error_code & ec, u
|
|||||||
|
|
||||||
if (readBuffer.size() < expectedPacketSize)
|
if (readBuffer.size() < expectedPacketSize)
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Failed to read packet!");
|
throw std::runtime_error("Failed to read packet! " + std::to_string(readBuffer.size()) + " bytes read, but " + std::to_string(expectedPacketSize) + " bytes expected!");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::byte> message(expectedPacketSize);
|
std::vector<std::byte> message(expectedPacketSize);
|
||||||
|
Loading…
Reference in New Issue
Block a user