[core] show known properties when one is missing
This commit is contained in:
parent
4b8a6c6c43
commit
7a91833d22
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ class Image implements \ArrayAccess
|
||||||
{
|
{
|
||||||
assert(is_string($offset));
|
assert(is_string($offset));
|
||||||
if(!$this->offsetExists($offset)) {
|
if(!$this->offsetExists($offset)) {
|
||||||
throw new \OutOfBoundsException("Undefined dynamic property: $offset");
|
$known = implode(", ", array_keys(static::$prop_types));
|
||||||
|
throw new \OutOfBoundsException("Undefined dynamic property: $offset (Known: $known)");
|
||||||
}
|
}
|
||||||
return $this->dynamic_props[$offset] ?? null;
|
return $this->dynamic_props[$offset] ?? null;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue