From: est31 Date: Fri, 8 May 2015 04:51:03 +0000 (+0200) Subject: Gracefully handle PacketErrors X-Git-Tag: 0.4.13~294 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=33c11415bf9f05192c104c4bb38f579824addfa5;p=oweals%2Fminetest.git Gracefully handle PacketErrors --- 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; } }