Skip to content
Permalink
Browse files

Gracefully handle PacketErrors

  • Loading branch information
est31 committed May 8, 2015
1 parent 0e64fc4 commit 33c11415bf9f05192c104c4bb38f579824addfa5
Showing with 5 additions and 2 deletions.
  1. +5 −2 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;
}
}

1 comment on commit 33c1141

@nerzhul

This comment has been minimized.

Copy link
Member

@nerzhul nerzhul commented on 33c1141 May 11, 2015

Great !

Please sign in to comment.