qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 31/31] qapi: Simplify error reporting for array


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 31/31] qapi: Simplify error reporting for array types
Date: Mon, 31 Aug 2015 10:28:36 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/31/2015 09:55 AM, Markus Armbruster wrote:
> check_type() first checks and peels off the array type, then checks
> the element type.  For two out of four error messages, it takes pains
> to report errors for "array of T" instead of just T.  Odd.  Let's
> examine the errors.
> 

> * The remaining two errors are unreachable, because the array checking
>   ensures that value is a string.

If we ever decide to enhance the grammar to allow
array-of-anonymous-type, we'd have to revisit this code; but that
doesn't affect the validity of this patch going in now.

> 
> Thus, reporting some errors for "array of T" instead of just T works,
> but dosn't really improve things.  Drop it.

s/dosn't/doesn't/

> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi.py                          | 6 ++----
>  tests/qapi-schema/args-array-unknown.err | 2 +-
>  tests/qapi-schema/returns-whitelist.err  | 2 +-
>  3 files changed, 4 insertions(+), 6 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]