diff options
author | Philippe Mathieu-Daudé | 2020-09-20 17:53:40 +0200 |
---|---|---|
committer | Eduardo Habkost | 2020-10-06 17:09:35 +0200 |
commit | 4d9c7c8471267d981843cf0a86bea2c28e2f0a4b (patch) | |
tree | bda4ebdc4d026865cf272d772130fc09e1e73c74 /qom | |
parent | hw/core/cpu: Add missing 'exec/cpu-common.h' include (diff) | |
download | qemu-4d9c7c8471267d981843cf0a86bea2c28e2f0a4b.tar.gz qemu-4d9c7c8471267d981843cf0a86bea2c28e2f0a4b.tar.xz qemu-4d9c7c8471267d981843cf0a86bea2c28e2f0a4b.zip |
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>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |