[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qom: Improve error message displayed with missing object pro
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] qom: Improve error message displayed with missing object properties |
Date: |
Mon, 5 Oct 2020 19:20:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 10/5/20 6:42 PM, Eduardo Habkost wrote:
> On Mon, Oct 05, 2020 at 10:46:38AM +0200, Paolo Bonzini wrote:
>> On 20/09/20 17:53, Philippe Mathieu-Daudé wrote:
>>> 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>
>>> ---
>>> qom/object.c | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/qom/object.c b/qom/object.c
>>> index 387efb25ebe..257914b1fe3 100644
>>> --- a/qom/object.c
>>> +++ b/qom/object.c
>>> @@ -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 <pbonzini@redhat.com>
>>
>> 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.