Skip to content

Commit

Permalink
feat: improve missing property exception message (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
tambait authored Nov 14, 2023
1 parent c17f21c commit ff14a05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Databases/Properties/PropertyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<string, PropertyInterface> */
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Properties/PropertyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<string, PropertyInterface> */
Expand Down

0 comments on commit ff14a05

Please sign in to comment.