diff mbox

[RFC,3/4] qerror: new errors for live block commit, QERR_TOP_NOT_FOUND

Message ID 6fa5167365c66d4c450000e86c34b77db0bd2288.1343710713.git.jcody@redhat.com
State New
Headers show

Commit Message

Jeff Cody July 31, 2012, 5:16 a.m. UTC
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+)

Comments

Eric Blake July 31, 2012, 6:35 p.m. UTC | #1
On 07/30/2012 11:16 PM, Jeff Cody wrote:
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  qerror.c |    4 ++++
>  qerror.h |    3 +++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/qerror.c b/qerror.c
> index 25c2733..69a59ab 100644
> --- a/qerror.c
> +++ b/qerror.c
> @@ -307,6 +307,10 @@ static const QErrorStringTable qerror_table[] = {
>          .desc      = "Too many open files",
>      },
>      {
> +        .error_fmt = QERR_TOP_NOT_FOUND,
> +        .desc      = "Top '%(top)' not found",
> +    },
> +    {

This conflicts with the series to simplify error handling; if we want
both series, I'd suggest rebasing this one to use the simpler handling.
diff mbox

Patch

diff --git a/qerror.c b/qerror.c
index 25c2733..69a59ab 100644
--- a/qerror.c
+++ b/qerror.c
@@ -307,6 +307,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Too many open files",
     },
     {
+        .error_fmt = QERR_TOP_NOT_FOUND,
+        .desc      = "Top '%(top)' not found",
+    },
+    {
         .error_fmt = QERR_UNDEFINED_ERROR,
         .desc      = "An undefined error has occurred",
     },
diff --git a/qerror.h b/qerror.h
index 0f9f303..931c703 100644
--- a/qerror.h
+++ b/qerror.h
@@ -251,6 +251,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_TOO_MANY_FILES \
     "{ 'class': 'TooManyFiles', 'data': {} }"
 
+#define QERR_TOP_NOT_FOUND \
+    "{ 'class': 'TopNotFound', 'data': { 'top': %s } }"
+
 #define QERR_UNDEFINED_ERROR \
     "{ 'class': 'UndefinedError', 'data': {} }"