Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>

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


Reply via email to