[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 21/45] qom: Use error_reportf_err() instead of g_printerr() in
From: |
Markus Armbruster |
Subject: |
[PATCH v4 21/45] qom: Use error_reportf_err() instead of g_printerr() in examples |
Date: |
Tue, 7 Jul 2020 18:05:49 +0200 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
include/qom/object.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index 94a61ccc3f..b70edd8cd9 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -671,8 +671,7 @@ Object *object_new(const char *typename);
* NULL);
*
* if (!obj) {
- * g_printerr("Cannot create memory backend: %s\n",
- * error_get_pretty(err));
+ * error_reportf_err(err, "Cannot create memory backend: ");
* }
* </programlisting>
* </example>
@@ -739,8 +738,7 @@ void object_apply_compat_props(Object *obj);
* NULL);
*
* if (!obj) {
- * g_printerr("Cannot set properties: %s\n",
- * error_get_pretty(err));
+ * error_reportf_err(err, "Cannot set properties: ");
* }
* </programlisting>
* </example>
--
2.26.2
- [PATCH v4 35/45] error: Eliminate error_propagate() with Coccinelle, part 2, (continued)
- [PATCH v4 35/45] error: Eliminate error_propagate() with Coccinelle, part 2, Markus Armbruster, 2020/07/07
- [PATCH v4 36/45] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/07
- [PATCH v4 26/45] qom: Put name parameter before value / visitor parameter, Markus Armbruster, 2020/07/07
- [PATCH v4 44/45] qdev: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/07
- [PATCH v4 41/45] qapi: Purge error_propagate() from QAPI core, Markus Armbruster, 2020/07/07
- [PATCH v4 17/45] qapi: Make visitor functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/07
- [PATCH v4 22/45] qom: Rename qdev_get_type() to object_get_type(), Markus Armbruster, 2020/07/07
- [PATCH v4 45/45] hmp: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/07
- [PATCH v4 37/45] error: Reduce unnecessary error propagation, Markus Armbruster, 2020/07/07
- [PATCH v4 39/45] qapi: Smooth another visitor error checking pattern, Markus Armbruster, 2020/07/07
- [PATCH v4 21/45] qom: Use error_reportf_err() instead of g_printerr() in examples,
Markus Armbruster <=
- [PATCH v4 02/45] error: Improve error.h's big comment, Markus Armbruster, 2020/07/07
- [PATCH v4 25/45] qom: Use return values to check for error where that's simpler, Markus Armbruster, 2020/07/07
- [PATCH v4 43/45] qemu-img: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/07
- Re: [PATCH v4 00/45] Less clumsy error checking, Markus Armbruster, 2020/07/07
- Re: [PATCH v4 00/45] Less clumsy error checking, no-reply, 2020/07/07