qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v0 0/9] QError
@ 2009-10-13 16:56 Luiz Capitulino
  2009-10-13 16:56 ` [Qemu-devel] [PATCH 1/9] QDict: Introduce qdict_iter() Luiz Capitulino
                   ` (10 more replies)
  0 siblings, 11 replies; 64+ messages in thread
From: Luiz Capitulino @ 2009-10-13 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, kraxel

 This series adds infrastructure which will be needed by the future monitor
protocol to handle and emit error information correctly.

 QError is a QObject designed to stored error information in way that it can
be emitted by the protocol code or printed in an user friendly way.

 To use it in the Monitor and its handlers, I've added a function called
qemu_error_structed(), which builds on top of Gerd's QemuErrorSink API, this
means that it is also capable of printing error information to stderr.

 Basically, we have a QError member in the Monitor struct, which will be set
if an error has occurred. The Monitor's top level code will check it at
handler exit time and handle the error properly.

 QError represents an error, and it has the following properties:

- Error code
- Error general description
- Error specific data

 Code and description are stored in a static table in the QError module itself,
the error specific data is generated at error time by the function calling
qemu_error_structed().

 This design is based on the way I plan to emit error information in the
protocol, which is:

{ "error": { "code": json-number,
             "desc": json-string,
             "data": json-value } "id": json-value, "timestamp": json-string }

 Besides introducing QError, this series also has simple usage examples for
qdev_device_add() and do_info_balloon().

 Hopefully this is the last big piece of infrastructure before having the
protocol parser itself.

 Please, review carefully.

 Thanks.

PS: Applies on top of my last series.

^ permalink raw reply	[flat|nested] 64+ messages in thread
* [Qemu-devel] [PATCH 0/9]: QError v3
@ 2009-11-12 20:42 Luiz Capitulino
  2009-11-12 20:42 ` [Qemu-devel] [PATCH 9/9] monitor: do_info_balloon(): use QError Luiz Capitulino
  0 siblings, 1 reply; 64+ messages in thread
From: Luiz Capitulino @ 2009-11-12 20:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, kraxel, armbru

 Hi,

 This is a new QError version which implements what has been suggested
by Anthony in this email:

http://lists.gnu.org/archive/html/qemu-devel/2009-11/msg00601.html

 Basically, the error table is back and qemu_error_new() calls are like
this:

qemu_error_new(QERR_DEVICE_NOT_FOUND, driver);

 Thanks.

^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2009-11-12 20:43 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-13 16:56 [Qemu-devel] [PATCH v0 0/9] QError Luiz Capitulino
2009-10-13 16:56 ` [Qemu-devel] [PATCH 1/9] QDict: Introduce qdict_iter() Luiz Capitulino
2009-10-13 16:56 ` [Qemu-devel] [PATCH 2/9] check-qdict: Add test for qdict_iter() Luiz Capitulino
2009-10-13 16:57 ` [Qemu-devel] [PATCH 3/9] qmisc: Introduce qobject_from_va() Luiz Capitulino
2009-10-13 21:52   ` Markus Armbruster
2009-10-14 13:40     ` Luiz Capitulino
2009-10-14 14:27       ` [Qemu-devel] " Paolo Bonzini
2009-10-13 16:57 ` [Qemu-devel] [PATCH 4/9] Introduce QError Luiz Capitulino
2009-10-13 16:57 ` [Qemu-devel] [PATCH 5/9] monitor: QError support Luiz Capitulino
2009-10-13 21:59   ` Markus Armbruster
2009-10-14 13:14     ` [Qemu-devel] " Paolo Bonzini
2009-10-14 14:07       ` Markus Armbruster
2009-10-13 16:57 ` [Qemu-devel] [PATCH 6/9] QError: Add qdev not found error Luiz Capitulino
2009-10-14 23:02   ` Hollis Blanchard
2009-10-15 13:34     ` Luiz Capitulino
2009-10-15 17:16       ` Hollis Blanchard
2009-10-15 17:52         ` Luiz Capitulino
2009-10-15 18:13           ` Hollis Blanchard
2009-10-15 19:08             ` Luiz Capitulino
2009-10-15 20:13               ` Hollis Blanchard
2009-10-15 20:57                 ` Anthony Liguori
2009-10-15 21:18                   ` Hollis Blanchard
2009-10-15 21:27                     ` Anthony Liguori
2009-10-15 22:44                       ` Hollis Blanchard
2009-10-16  8:06                         ` [Qemu-devel] " Paolo Bonzini
2009-10-16 13:05                           ` Luiz Capitulino
2009-10-19 10:25                             ` Daniel P. Berrange
2009-10-19 12:28                               ` Luiz Capitulino
2009-10-19 12:42                                 ` Daniel P. Berrange
2009-10-16 13:39                           ` Anthony Liguori
2009-10-18  4:25                       ` [Qemu-devel] " Jamie Lokier
2009-10-18 12:17                         ` [Qemu-devel] " Paolo Bonzini
2009-10-19 16:50                           ` Hollis Blanchard
2009-10-19 21:16                             ` Paolo Bonzini
2009-10-16  7:30               ` [Qemu-devel] " Gerd Hoffmann
2009-10-16 12:39                 ` Luiz Capitulino
2009-10-16 13:34                   ` [Qemu-devel] " Paolo Bonzini
2009-10-16 13:37                 ` [Qemu-devel] " Anthony Liguori
2009-10-16 14:17                   ` Luiz Capitulino
2009-10-16 17:28                     ` [Qemu-devel] " Paolo Bonzini
2009-10-16 17:47                       ` Anthony Liguori
2009-10-16  8:02               ` Paolo Bonzini
2009-10-18  4:28                 ` Jamie Lokier
2009-10-18  4:34                   ` Jamie Lokier
2009-10-13 16:57 ` [Qemu-devel] [PATCH 7/9] qdev: Use QError for " Luiz Capitulino
2009-10-13 22:34   ` Markus Armbruster
2009-10-14 13:29     ` [Qemu-devel] " Paolo Bonzini
2009-10-14 16:42       ` Luiz Capitulino
2009-10-14 14:51     ` [Qemu-devel] " Luiz Capitulino
2009-10-19 10:12     ` Daniel P. Berrange
2009-10-19 10:40       ` Gerd Hoffmann
2009-10-19 10:47         ` Daniel P. Berrange
2009-10-19 11:22         ` [Qemu-devel] " Paolo Bonzini
2009-10-19 14:00       ` [Qemu-devel] " Anthony Liguori
2009-10-19 15:21         ` Daniel P. Berrange
2009-10-19 15:27           ` Anthony Liguori
2009-10-19 15:39             ` Daniel P. Berrange
2009-10-13 16:57 ` [Qemu-devel] [PATCH 8/9] QError: Add do_info_balloon() errors Luiz Capitulino
2009-10-13 16:57 ` [Qemu-devel] [PATCH 9/9] monitor: do_info_balloon(): use QError Luiz Capitulino
2009-10-15 19:24 ` [Qemu-devel] [PATCH v0 0/9] QError Anthony Liguori
2009-10-15 19:37   ` Luiz Capitulino
2009-10-19 13:13 ` Markus Armbruster
2009-10-19 14:11   ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2009-11-12 20:42 [Qemu-devel] [PATCH 0/9]: QError v3 Luiz Capitulino
2009-11-12 20:42 ` [Qemu-devel] [PATCH 9/9] monitor: do_info_balloon(): use QError Luiz Capitulino

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