Patchwork [FOR,0.12,15/18] New QERR_INVALID_PARAMETER

login
register
mail settings
Submitter Markus Armbruster
Date Dec. 7, 2009, 8:37 p.m.
Message ID <1260218236-22143-16-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/40543/
State New
Headers show

Comments

Markus Armbruster - Dec. 7, 2009, 8:37 p.m.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/qerror.c b/qerror.c
index e6b7f62..aa89a3d 100644
--- a/qerror.c
+++ b/qerror.c
@@ -77,6 +77,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Invalid block format %(name)",
     },
     {
+        .error_fmt = QERR_INVALID_PARAMETER,
+        .desc      = "Invalid parameter %(name)",
+    },
+    {
         .error_fmt = QERR_INVALID_PARAMETER_TYPE,
         .desc      = "Invalid parameter type, expected: %(expected)",
     },
diff --git a/qerror.h b/qerror.h
index 2262619..48f1ab6 100644
--- a/qerror.h
+++ b/qerror.h
@@ -65,6 +65,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_INVALID_BLOCK_FORMAT \
     "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }"
 
+#define QERR_INVALID_PARAMETER \
+    "{ 'class': 'invalid_parameter', 'data': { 'name': %s } }"
+
 #define QERR_INVALID_PARAMETER_TYPE \
     "{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }"