From 1d71f5edb387bab34811bb090b7cf084272e9a91 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 13 Dec 2018 09:55:50 +0000 Subject: [PATCH] DataPacket: more detail in error messages for undefined fields --- src/pocketmine/network/mcpe/protocol/DataPacket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/DataPacket.php b/src/pocketmine/network/mcpe/protocol/DataPacket.php index fbdc383e8..a3141c535 100644 --- a/src/pocketmine/network/mcpe/protocol/DataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/DataPacket.php @@ -139,10 +139,10 @@ abstract class DataPacket extends NetworkBinaryStream{ } public function __get($name){ - throw new \Error("Cannot read non-existing field \"$name\""); + throw new \Error("Undefined property: " . get_class($this) . "::\$" . $name); } public function __set($name, $value){ - throw new \Error("Cannot write non-existing field \"$name\""); + throw new \Error("Undefined property: " . get_class($this) . "::\$" . $name); } }