mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Report more information on exception
This commit is contained in:
@@ -92,7 +92,7 @@ void NetworkConnection::onPacketReceived(const boost::system::error_code & ec, u
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user