From 4bbf1d56dc62e914098793454f2307ce431e12c9 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 15 Jun 2019 14:27:11 +0100 Subject: [PATCH] NetworkInventoryAction: shorten exception message This is logged with the network session's logger, which provides context information already. --- .../network/mcpe/protocol/types/NetworkInventoryAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php index c88b046e7..78aae89d1 100644 --- a/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php +++ b/src/pocketmine/network/mcpe/protocol/types/NetworkInventoryAction.php @@ -173,7 +173,7 @@ class NetworkInventoryAction{ 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: if($this->inventorySlot !== self::ACTION_MAGIC_SLOT_DROP_ITEM){ throw new \UnexpectedValueException("Only expecting drop-item world actions from the client!"); @@ -208,7 +208,7 @@ class NetworkInventoryAction{ } //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: throw new \UnexpectedValueException("Unknown inventory source type $this->sourceType"); }