From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH] qom: print out type name on lookup failure
Date: Tue, 13 Feb 2018 18:18:54 +0200 [thread overview]
Message-ID: <1518538727-952-1-git-send-email-mst@redhat.com> (raw)
this makes debugging a bit easier.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
qom/object.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/qom/object.c b/qom/object.c
index c58c52d..a1e5f99 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -499,6 +499,10 @@ Object *object_new(const char *typename)
{
TypeImpl *ti = type_get_by_name(typename);
+ if (!ti) {
+ g_error("Object type not found: %s\n", typename);
+ }
+
return object_new_with_type(ti);
}
--
MST
reply other threads:[~2018-02-13 16:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1518538727-952-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).