From ff14a05d68c4ab9fcfb91a1c499c666dafa4c83e Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 14 Nov 2023 21:05:40 +0100 Subject: [PATCH] feat: improve missing property exception message (#310) --- src/Databases/Properties/PropertyCollection.php | 4 ++-- src/Pages/Properties/PropertyCollection.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Databases/Properties/PropertyCollection.php b/src/Databases/Properties/PropertyCollection.php index 0102171e..f938d1f4 100644 --- a/src/Databases/Properties/PropertyCollection.php +++ b/src/Databases/Properties/PropertyCollection.php @@ -51,7 +51,7 @@ public function get(string $propertyName): PropertyInterface return $this->properties[$propertyName]; } - throw new \Exception("Property not found"); + throw new \Exception("Property '{$propertyName}' not found"); } public function getById(string $propertyId): PropertyInterface @@ -62,7 +62,7 @@ public function getById(string $propertyId): PropertyInterface } } - throw new \Exception("Property not found."); + throw new \Exception("Property '{$propertyId}' not found."); } /** @return array */ diff --git a/src/Pages/Properties/PropertyCollection.php b/src/Pages/Properties/PropertyCollection.php index 1b784d29..233b99cb 100644 --- a/src/Pages/Properties/PropertyCollection.php +++ b/src/Pages/Properties/PropertyCollection.php @@ -42,7 +42,7 @@ public function get(string $propertyName): PropertyInterface return $this->properties[$propertyName]; } - throw new \Exception("Property not found"); + throw new \Exception("Property '{$propertyName}' not found"); } public function getById(string $propertyId): PropertyInterface @@ -53,7 +53,7 @@ public function getById(string $propertyId): PropertyInterface } } - throw new \Exception("Property not found."); + throw new \Exception("Property '{$propertyId}' not found."); } /** @return array */