Gracefully handle PacketErrors
authorest31 <MTest31@outlook.com>
Fri, 8 May 2015 04:51:03 +0000 (06:51 +0200)
committerest31 <MTest31@outlook.com>
Fri, 8 May 2015 04:51:03 +0000 (06:51 +0200)
src/server.cpp

index 921dd14de4e6b9f3d3232cecc2640a8685c2767d..7289dc905a89edbb857d64254c66c5da839c2c96 100644 (file)
@@ -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;
        }
 }