Patchwork [03/16] QError: Introduce QERR_IO_ERROR

login
register
mail settings
Submitter Luiz Capitulino
Date Nov. 28, 2011, 6:11 p.m.
Message ID <1322503885-5913-4-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/128061/
State New
Headers show

Comments

Luiz Capitulino - Nov. 28, 2011, 6:11 p.m.
Signed-off-by: Luiz Capitulino <lcapitulino@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 fdf62b9..d8d0256 100644
--- a/qerror.c
+++ b/qerror.c
@@ -149,6 +149,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Password incorrect",
     },
     {
+        .error_fmt = QERR_IO_ERROR,
+        .desc      = "An IO error has occurred",
+    },
+    {
         .error_fmt = QERR_JSON_PARSING,
         .desc      = "Invalid JSON syntax",
     },
diff --git a/qerror.h b/qerror.h
index 2d3d43b..2a64b24 100644
--- a/qerror.h
+++ b/qerror.h
@@ -126,6 +126,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_INVALID_PASSWORD \
     "{ 'class': 'InvalidPassword', 'data': {} }"
 
+#define QERR_IO_ERROR \
+    "{ 'class': 'IOError', 'data': {} }"
+
 #define QERR_JSON_PARSING \
     "{ 'class': 'JSONParsing', 'data': {} }"