From: Philippe Mathieu-Daudé Date: Sun, 20 Sep 2020 15:53:40 +0000 (+0200) Subject: qom: Improve error message displayed with missing object properties X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4d9c7c8471267d981843cf0a86bea2c28e2f0a4b;p=qemu.git 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é Signed-off-by: Eduardo Habkost Reviewed-by: Li Qiang Acked-by: Paolo Bonzini Message-Id: <20200920155340.401482-1-f4bug@amsat.org> Signed-off-by: Eduardo Habkost --- diff --git a/qom/object.c b/qom/object.c index c335dce7e4..1065355233 100644 --- a/qom/object.c +++ b/qom/object.c @@ -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; }