diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-06-07 16:21:39 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-06-07 16:21:39 +0200 |
commit | b192dcec842cf043ae936c446bb252259b415ab5 (patch) | |
tree | d7c54847a22a63899eb515a67a3a74ae4ad90d38 /src/network | |
parent | 2017-05-31 (diff) | |
download | AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.tar AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.tar.gz AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.tar.bz2 AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.tar.lz AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.tar.xz AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.tar.zst AltCraft-b192dcec842cf043ae936c446bb252259b415ab5.zip |
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/Network.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/Network.cpp b/src/network/Network.cpp index 7757be9..399ce20 100644 --- a/src/network/Network.cpp +++ b/src/network/Network.cpp @@ -9,6 +9,7 @@ Network::Network(std::string address, unsigned short port) : m_address(address), LOG(ERROR) << "Can't connect to remote server"; } else { LOG(ERROR) << "Connection failed with unknown reason"; + throw std::runtime_error("Connection is failed"); throw 13; } } @@ -69,7 +70,7 @@ Packet Network::ReceivePacket() { } if (dataLen < packetLen) { LOG(ERROR) << "Received data is "<<dataLen<<" but "<<packetLen<<" is promoted"; - throw std::runtime_error(""); + throw std::runtime_error("Data is losted"); } else { Packet p(bufPack); delete[] bufPack; |