[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] qmp: Improve QMP dispatch error messages
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] qmp: Improve QMP dispatch error messages |
Date: |
Thu, 27 Apr 2017 09:06:57 +0000 |
On Thu, Apr 27, 2017 at 12:46 PM Markus Armbruster <address@hidden>
wrote:
> Signed-off-by: Markus Armbruster <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
>
Reviewed-by: Marc-André Lureau <address@hidden>
> ---
> qapi/qmp-dispatch.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
> index dc50212..5ad36f8 100644
> --- a/qapi/qmp-dispatch.c
> +++ b/qapi/qmp-dispatch.c
> @@ -30,7 +30,7 @@ static QDict *qmp_dispatch_check_obj(const QObject
> *request, Error **errp)
>
> dict = qobject_to_qdict(request);
> if (!dict) {
> - error_setg(errp, "Expected '%s' in QMP input", "object");
> + error_setg(errp, "QMP input must be a JSON object");
> return NULL;
> }
>
> @@ -41,26 +41,26 @@ static QDict *qmp_dispatch_check_obj(const QObject
> *request, Error **errp)
>
> if (!strcmp(arg_name, "execute")) {
> if (qobject_type(arg_obj) != QTYPE_QSTRING) {
> - error_setg(errp, "QMP input object member '%s' expects
> '%s'",
> - "execute", "string");
> + error_setg(errp,
> + "QMP input member 'execute' must be a string");
> return NULL;
> }
> has_exec_key = true;
> } else if (!strcmp(arg_name, "arguments")) {
> if (qobject_type(arg_obj) != QTYPE_QDICT) {
> - error_setg(errp, "QMP input object member '%s' expects
> '%s'",
> - "arguments", "object");
> + error_setg(errp,
> + "QMP input member 'arguments' must be an
> object");
> return NULL;
> }
> } else {
> - error_setg(errp, "QMP input object member '%s' is unexpected",
> + error_setg(errp, "QMP input member '%s' is unexpected",
> arg_name);
> return NULL;
> }
> }
>
> if (!has_exec_key) {
> - error_setg(errp, "Expected '%s' in QMP input", "execute");
> + error_setg(errp, "QMP input lacks member 'execute'");
> return NULL;
> }
>
> --
> 2.7.4
>
>
> --
Marc-André Lureau
- [Qemu-devel] [PATCH 3/4] qapi: Document intended use of @name within alternate visits, (continued)
- [Qemu-devel] [PATCH 3/4] qapi: Document intended use of @name within alternate visits, Markus Armbruster, 2017/04/27
- [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Markus Armbruster, 2017/04/27
- Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Marc-André Lureau, 2017/04/27
- Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Markus Armbruster, 2017/04/27
- Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Marc-André Lureau, 2017/04/27
- Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Markus Armbruster, 2017/04/27
- Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Eric Blake, 2017/04/27
- Re: [Qemu-devel] [PATCH 4/4] qobject-input-visitor: Catch misuse of end_struct vs. end_list, Markus Armbruster, 2017/04/27
[Qemu-devel] [PATCH 1/4] qmp: Improve QMP dispatch error messages, Markus Armbruster, 2017/04/27
- Re: [Qemu-devel] [PATCH 1/4] qmp: Improve QMP dispatch error messages,
Marc-André Lureau <=