All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-trivial@nongnu.org,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] qom: Improve error message displayed with missing object properties
Date: Mon, 5 Oct 2020 12:42:44 -0400	[thread overview]
Message-ID: <20201005164244.GK7303@habkost.net> (raw)
In-Reply-To: <0263e47d-549e-8acb-a6cb-93a7436f5f6d@redhat.com>

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.

-- 
Eduardo



  reply	other threads:[~2020-10-05 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20 15:53 [PATCH] qom: Improve error message displayed with missing object properties Philippe Mathieu-Daudé
2020-09-20 16:08 ` Li Qiang
2020-10-05  7:42 ` Philippe Mathieu-Daudé
2020-10-05  8:46 ` Paolo Bonzini
2020-10-05 16:42   ` Eduardo Habkost [this message]
2020-10-05 17:20     ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201005164244.GK7303@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.