aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-05-08 06:51:03 +0200
committerest31 <MTest31@outlook.com>2015-05-08 06:51:03 +0200
commit33c11415bf9f05192c104c4bb38f579824addfa5 (patch)
tree6cf308d05c6e2d18d809c478fbed82dc32dcf58a /src
parent0e64fc45b909b50dcd7551e4b9492517fbaee40e (diff)
downloadminetest-33c11415bf9f05192c104c4bb38f579824addfa5.tar.gz
minetest-33c11415bf9f05192c104c4bb38f579824addfa5.tar.bz2
minetest-33c11415bf9f05192c104c4bb38f579824addfa5.zip
Gracefully handle PacketErrors
Diffstat (limited to 'src')
-rw-r--r--src/server.cpp7
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;
}
}