qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qom: print out type name on lookup failure
@ 2018-02-13 16:18 Michael S. Tsirkin
  0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2018-02-13 16:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Färber

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-13 16:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 16:18 [Qemu-devel] [PATCH] qom: print out type name on lookup failure Michael S. Tsirkin

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).