[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 00/27]: add new error format
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [RFC 00/27]: add new error format |
Date: |
Fri, 27 Jul 2012 18:31:41 -0300 |
[Please, read below why this is an RFC]
This series implements the 'Plan for error handling in QMP' as described
by Anthony in this email:
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03764.html
Basically, this replaces almost all error classes by GenericError (the
exception are a few error classes used by libvirt) and drops the error
data memeber. This also adds a free form string to error_set().
On the wire, we go from:
{ "error": { "class": "DeviceNotRemovable",
"data": { "device": "virtio0" },
"desc": "Device 'virtio0' is not removable" } }
to:
{ "error": { "class": "GenericError",
"desc": "Device 'virtio0' is not removable" } }
Internally, we go from:
void error_set(Error **err, const char *fmt, ...);
to:
void error_set(Error **err, ErrorClass err_class, const char *fmt, ...);
This series is in RFC state because when I was almost done I've found that
I've broke error_is_type() and qemu-ga (both should be easy to fix). Besides,
the resulting code is missing some simplifications and more testing...
But I wanted to drop this before going out for the weekend :)
QMP/qmp-spec.txt | 10 +-
block.c | 1 +
block_int.h | 1 +
configure | 10 -
error.c | 46 +----
error.h | 15 +-
error_int.h | 1 -
hmp.c | 80 +++++---
hmp.h | 1 +
monitor.c | 80 ++------
qapi-schema.json | 33 +++-
qerror.c | 514 ++------------------------------------------------
qerror.h | 164 ++++++++--------
qmp-commands.hx | 3 +-
scripts/qapi-types.py | 17 +-
scripts/qapi.py | 4 +-
16 files changed, 226 insertions(+), 754 deletions(-)
- [Qemu-devel] [RFC 00/27]: add new error format,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 01/27] monitor: drop unused monitor debug code, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 02/27] qerror: QERR_AMBIGUOUS_PATH: drop %(object) from human msg, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 03/27] qerror: QERR_DEVICE_ENCRYPTED: add filename info to human msg, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 04/27] qerror: reduce public exposure, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 05/27] qerror: drop qerror_abort(), Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 06/27] qerror: QError: drop file, linenr, func, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 07/27] qerror: qerror_format(): return an allocated string, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 08/27] qerror: don't delay error message construction, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 09/27] error: don't delay error message construction, Luiz Capitulino, 2012/07/27
- [Qemu-devel] [PATCH 10/27] qmp: query-block: add 'valid_encryption_key' field, Luiz Capitulino, 2012/07/27