[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v0 00/21]: Monitor: improve handlers error handling
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH v0 00/21]: Monitor: improve handlers error handling |
Date: |
Wed, 10 Feb 2010 23:49:46 -0200 |
Hi there,
When I started converting handlers to the QObject style, I thought that
returning an error code wouldn't be needed. That is, we have an error object
already, so if the handler returns the error object it has failed, otherwise
it has succeeded.
This was also very convenient, because handlers have never returned an error
code, and thus it would be easier to add a call to qemu_error_new() in the
right place instead of returning error codes.
Turns out we need both. Actually, I should not have abused the error object
this way because (as Markus says) this is too fragile and we can end up
reporting bogus errors to clients (among other problems).
The good news is that it's easy to fix.
All we have to do is to change cmd_new() (the handler callback) to return an
error code and convert existing QObject handlers to it. This series does that
and most of the patches are really straightforward conversions.
Additionally, Markus has designed an excellent debug mechanism for QMP, which
is implemented by the last patches in this series, and will allow us to catch
important QObject conversion and error handling bugs in handlers.
Thanks.
- [Qemu-devel] [PATCH v0 00/21]: Monitor: improve handlers error handling,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 01/21] Monitor: Introduce cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 03/21] Monitor: Convert do_cont() to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 02/21] Monitor: Convert simple handlers to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 04/21] Monitor: Convert do_eject() to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 05/21] Monitor: Convert do_cpu_set() to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 06/21] Monitor: Convert do_block_set_passwd() to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 07/21] Monitor: Convert do_getfd() to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 08/21] Monitor: Convert do_closefd() to cmd_new_ret(), Luiz Capitulino, 2010/02/10
- [Qemu-devel] [PATCH 09/21] Monitor: Convert pci_device_hot_add() to cmd_new_ret(), Luiz Capitulino, 2010/02/10