diff options
author | est31 <MTest31@outlook.com> | 2015-05-08 06:51:03 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-05-08 06:51:03 +0200 |
commit | 33c11415bf9f05192c104c4bb38f579824addfa5 (patch) | |
tree | 6cf308d05c6e2d18d809c478fbed82dc32dcf58a | |
parent | 0e64fc45b909b50dcd7551e4b9492517fbaee40e (diff) | |
download | minetest-33c11415bf9f05192c104c4bb38f579824addfa5.tar.gz minetest-33c11415bf9f05192c104c4bb38f579824addfa5.tar.bz2 minetest-33c11415bf9f05192c104c4bb38f579824addfa5.zip |
Gracefully handle PacketErrors
-rw-r--r-- | src/server.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server.cpp b/src/server.cpp index 921dd14de..7289dc905 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1227,11 +1227,14 @@ void Server::ProcessData(NetworkPacket *pkt) } handleCommand(pkt); - } - catch(SendFailedException &e) { + } catch (SendFailedException &e) { errorstream << "Server::ProcessData(): SendFailedException: " << "what=" << e.what() << std::endl; + } catch (PacketError &e) { + actionstream << "Server::ProcessData(): PacketError: " + << "what=" << e.what() + << std::endl; } } |