Use more appropriate exceptions in the protocol layer

This commit is contained in:
Dylan K. Taylor
2019-01-03 17:57:06 +00:00
parent 504cc3bf8b
commit 0f941410f6
7 changed files with 21 additions and 8 deletions

View File

@ -111,7 +111,7 @@ class BatchPacket extends DataPacket{
$pk = PacketPool::getPacket($buf);
if(!$pk->canBeBatched()){
throw new \InvalidArgumentException("Received invalid " . get_class($pk) . " inside BatchPacket");
throw new \UnexpectedValueException("Received invalid " . get_class($pk) . " inside BatchPacket");
}
$session->handleDataPacket($pk);