mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 11:45:30 +00:00
NetworkInventoryAction: shorten exception message
This is logged with the network session's logger, which provides context information already.
This commit is contained in:
parent
50a7fc0ba3
commit
4bbf1d56dc
@ -173,7 +173,7 @@ class NetworkInventoryAction{
|
|||||||
return new SlotChangeAction($window, $this->inventorySlot, $this->oldItem, $this->newItem);
|
return new SlotChangeAction($window, $this->inventorySlot, $this->oldItem, $this->newItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \UnexpectedValueException("Player " . $player->getName() . " has no open container with window ID $this->windowId");
|
throw new \UnexpectedValueException("No open container with window ID $this->windowId");
|
||||||
case self::SOURCE_WORLD:
|
case self::SOURCE_WORLD:
|
||||||
if($this->inventorySlot !== self::ACTION_MAGIC_SLOT_DROP_ITEM){
|
if($this->inventorySlot !== self::ACTION_MAGIC_SLOT_DROP_ITEM){
|
||||||
throw new \UnexpectedValueException("Only expecting drop-item world actions from the client!");
|
throw new \UnexpectedValueException("Only expecting drop-item world actions from the client!");
|
||||||
@ -208,7 +208,7 @@ class NetworkInventoryAction{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: more stuff
|
//TODO: more stuff
|
||||||
throw new \UnexpectedValueException("Player " . $player->getName() . " has no open container with window ID $this->windowId");
|
throw new \UnexpectedValueException("No open container with window ID $this->windowId");
|
||||||
default:
|
default:
|
||||||
throw new \UnexpectedValueException("Unknown inventory source type $this->sourceType");
|
throw new \UnexpectedValueException("Unknown inventory source type $this->sourceType");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user