Skip to content
Snippets Groups Projects
Commit 4d9c7c84 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé :speech_balloon: Committed by Eduardo Habkost
Browse files

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: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarLi Qiang <liq3ea@gmail.com>
Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200920155340.401482-1-f4bug@amsat.org>
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
parent 4a795202
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment