[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable desc
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] Re: [FOR 0.12 PATCH 18/18] QMP: add human-readable description to error response |
Date: |
Tue, 8 Dec 2009 12:41:50 -0200 |
On Tue, 08 Dec 2009 07:18:11 -0600
Anthony Liguori <address@hidden> wrote:
> Luiz Capitulino wrote:
> > On Mon, 7 Dec 2009 21:37:16 +0100
> > Markus Armbruster <address@hidden> wrote:
> >
> >
> >> -{ "error": { "class": json-string, "data": json-value }, "id": json-value
> >> }
> >> +{ "error": { "class": json-string, "data": json-value, "desc":
> >> json-string },
> >> + "id": json-value }
> >>
> >> Where,
> >>
> >> - The "class" member contains the error class name (eg.
> >> "ServiceUnavailable")
> >> - The "data" member contains specific error data and is defined in a
> >> per-command basis, it will be an empty json-object if the error has no
> >> data
> >> +- The "desc" member is a human-readable error message. Clients should
> >> + not attempt to parse this message.
> >> - The "id" member contains the transaction identification associated with
> >> the command execution (if issued by the Client)
> >>
> >
> > As we've talked on irc, I don't agree with this change.
> >
> > Basically, adding 'desc' to the standard error message introduces all
> > the problems we've discussed about free-form English strings.
> >
>
> It's not free form English. The 'desc' string is always autogenerated
> based on the error object.
>
> It's completely redundant information because you can already generate
> that string, but it simplifies client creation because a lazy client
> does not have to include the conversion table if they only care about
> English error output.
I wonder if we could have a simpler design for the internal API if
we knew in advance that 'desc' would be part of the standard
error message, eg. error code based.
But, as Markus said it's not the 'worst' as I've put it, let's
move forward then.
[Qemu-devel] [FOR 0.12 PATCH 04/18] QError: Put error definitions in alphabetical order, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 09/18] QError: New QERR_SET_PASSWD_FAILED, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 13/18] monitor: convert do_closefd() to QError, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 14/18] QError: New QERR_FD_NOT_SUPPLIED, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 06/18] QError: New QERR_DEVICE_NOT_REMOVABLE, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 01/18] QError: new class for device encrypted errors, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 05/18] QError: New QERR_DEVICE_LOCKED, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 11/18] monitor: convert do_change() to QObject, QError, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 07/18] monitor: convert do_eject() to QError, Markus Armbruster, 2009/12/07
[Qemu-devel] [FOR 0.12 PATCH 15/18] New QERR_INVALID_PARAMETER, Markus Armbruster, 2009/12/07