mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 14:02:47 +08:00
改进Model类的getAttr异常提示
This commit is contained in:
@@ -245,7 +245,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
} elseif (array_key_exists($name, $this->data)) {
|
||||
return $this->data[$name];
|
||||
} else {
|
||||
throw new InvalidArgumentException('property not exists:' . __CLASS__ . '->' . $name);
|
||||
throw new InvalidArgumentException('property not exists:' . $this->class . '->' . $name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
$this->data[$name] = $value;
|
||||
return $value;
|
||||
} else {
|
||||
throw new InvalidArgumentException('property not exists:' . __CLASS__ . '->' . $name);
|
||||
throw new InvalidArgumentException('property not exists:' . $this->class . '->' . $name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user