mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Use more appropriate exceptions in the protocol layer
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user