[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/22] qerror: add new error message for invalid enu
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 05/22] qerror: add new error message for invalid enum values |
Date: |
Sun, 6 Mar 2011 19:22:47 -0600 |
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/qerror.c b/qerror.c
index 78d3884..5a1e637 100644
--- a/qerror.c
+++ b/qerror.c
@@ -109,6 +109,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = "Duplicate ID '%(id)' for %(object)",
},
{
+ .error_fmt = QERR_ENUM_VALUE_INVALID,
+ .desc = "Enum value '%(value)' is invalid for type '%(type)'",
+ },
+ {
.error_fmt = QERR_FD_NOT_FOUND,
.desc = "File descriptor named '%(name)' not found",
},
diff --git a/qerror.h b/qerror.h
index 495d0a4..35e7253 100644
--- a/qerror.h
+++ b/qerror.h
@@ -98,6 +98,9 @@ void qerror_set_desc(QError *qerr, const char *fmt);
#define QERR_DUPLICATE_ID \
"{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }"
+#define QERR_ENUM_VALUE_INVALID \
+ "{ 'class': 'EnumValueInvalid', 'data': { 'type': %s, 'value': %s } }"
+
#define QERR_FD_NOT_FOUND \
"{ 'class': 'FdNotFound', 'data': { 'name': %s } }"
--
1.7.0.4
- [Qemu-devel] [PATCH 22/22] qapi: generate HTML report for test-libqmp, (continued)
- [Qemu-devel] [PATCH 22/22] qapi: generate HTML report for test-libqmp, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 01/22] Add hard build dependency on glib, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 20/22] qapi: add code generator for libqmp, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 04/22] qerror: split out the reporting bits of QError, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 08/22] qapi: add code generator for qmp-types, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 09/22] qapi: add code generator for type marshallers, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH 05/22] qerror: add new error message for invalid enum values,
Anthony Liguori <=
- [Qemu-devel] [PATCH] qapi: qmp-types.c and qmp-types.h, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH] qapi: qmp-marshal-types.c and qmp-marshal-types.h, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH] qapi: add qmp-marshal.c and qmp.h, Anthony Liguori, 2011/03/06
- [Qemu-devel] [PATCH] qapi: add libqmp.c and libqmp.h, Anthony Liguori, 2011/03/06
- Re: [Qemu-devel] [PATCH 00/22] QAPI Round 1, Stefan Hajnoczi, 2011/03/07