qom: Improve error message displayed with missing object properties
PATCH 1/1 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.
--- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
qom/object.c +2 -1
@@ -1259,7 +1259,8 @@ ObjectProperty *object_property_find(Object *obj, const char *name,return prop; } -error_setg (errp,"Property '.%s' not found" , name); +error_setg (errp,"Property '%s.%s' not found" , +object_get_typename (obj), name);return NULL ; }
Signature · 1 line
2.26.2
Quoted 6 lines · Philippe Mathieu-Daudé <[email protected]> 于2020年9月20日周日 下午11:54写道:
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é <[email protected]>
Quoted 22 lines
--- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)qom/object.c +2
-2@@ -1259,7 +1259,8 @@ ObjectProperty *object_property_find(Object *obj, const char *name,return prop; } -error_setg (errp,"Property '.%s' not found" , name); +error_setg (errp,"Property '%s.%s' not found" , +object_get_typename (obj), name);return NULL ; } --2.26.2
Eduardo, can you take this patch, or can it goes via qemu-trivial?
Quoted 24 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)qom/object.c +2
-1@@ -1259,7 +1259,8 @@ ObjectProperty *object_property_find(Object *obj, const char *name,return prop; } -error_setg (errp,"Property '.%s' not found" , name); +error_setg (errp,"Property '%s.%s' not found" , +object_get_typename (obj), name);return NULL ; }
Quoted 15 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)qom/object.c +0
-0
qom/object.c ObjectProperty *object_property_find(Object *obj, const char *name, · line 1266
Quoted 9 lines
qom/object.c +2
-1@@ -1259,7 +1259,8 @@ ObjectProperty *object_property_find(Object *obj, const char *name,return prop; } -error_setg (errp,"Property '.%s' not found" , name); +error_setg (errp,"Property '%s.%s' not found" , +object_get_typename (obj), name);return NULL ; }
I think it's okay for qemu-trivial.
Quoted 28 lines · Paolo Bonzini
Quoted 15 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)qom/object.c +0
-0qom/object.c ObjectProperty *object_property_find(Object *obj, const char *name, · line 1266
Quoted 9 lines
qom/object.c +2
-1@@ -1259,7 +1259,8 @@ ObjectProperty *object_property_find(Object *obj, const char *name,return prop; } -error_setg (errp,"Property '.%s' not found" , name); +error_setg (errp,"Property '%s.%s' not found" , +object_get_typename (obj), name);return NULL ; }Acked-by Paolo Bonzini <[email protected]>
Quoted 1 line
I think it's okay for qemu-trivial.
It would be okay, but it doesn't apply on master anymore due to the object_propert_find_err() refactor. I've fixed the conflicts and queued it on machine-next.
Signature · 1 line
Eduardo
Quoted 29 lines · Eduardo Habkost
Quoted 28 lines · Paolo Bonzini
Quoted 15 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- qom/object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)qom/object.c +0
-0qom/object.c ObjectProperty *object_property_find(Object *obj, const char *name, · line 1266
Quoted 9 lines
qom/object.c +2
-1@@ -1259,7 +1259,8 @@ ObjectProperty *object_property_find(Object *obj, const char *name,return prop; } -error_setg (errp,"Property '.%s' not found" , name); +error_setg (errp,"Property '%s.%s' not found" , +object_get_typename (obj), name);return NULL ; }Acked-by Paolo Bonzini <[email protected]>
Quoted 5 lines
Quoted 1 line
I think it's okay for qemu-trivial.
It would be okay, but it doesn't apply on master anymore due to the
object_propert_find_err()refactor. I've fixed the conflicts and queued it on machine-next.
Oh sorry I didn't noticed, thanks for fixing/queuing!
Phil.