mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
qom: Improve error message displayed with missing object properties
Instead of only displaying the property missing, also display the object name. This help developer to quickly figure out the mistake without opening a debugger. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200920155340.401482-1-f4bug@amsat.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
4a795202ec
commit
4d9c7c8471
1 changed files with 2 additions and 1 deletions
|
@ -1291,7 +1291,8 @@ ObjectProperty *object_property_find_err(Object *obj, const char *name,
|
|||
{
|
||||
ObjectProperty *prop = object_property_find(obj, name);
|
||||
if (!prop) {
|
||||
error_setg(errp, "Property '.%s' not found", name);
|
||||
error_setg(errp, "Property '%s.%s' not found",
|
||||
object_get_typename(obj), name);
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue