[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 18/26] tests/qapi-schema: Rename tests from data- to args-, (continued)
- [Qemu-devel] [PATCH v2 18/26] tests/qapi-schema: Rename tests from data- to args-, Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH v2 15/26] qapi: Document shortcoming with union 'data' branch, Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH v2 21/26] qapi: Command returning anonymous type doesn't work, outlaw, Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH v2 26/26] qapi: Generated code cleanup, Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH v2 22/26] qapi-commands: Fix gen_err_check(e) for e and e != 'local_err', Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH v2 20/26] qapi: Fix to reject union command and event arguments, Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH v2 24/26] qapi-commands: Don't feed output of mcgen() to mcgen() again, Markus Armbruster, 2015/08/28
- [Qemu-devel] [PATCH 27/31] qapi: Drop one of two "simple union must not have base" checks, Markus Armbruster, 2015/08/31
- [Qemu-devel] [PATCH 31/31] qapi: Simplify error reporting for array types, Markus Armbruster, 2015/08/31
- Re: [Qemu-devel] [PATCH 31/31] qapi: Simplify error reporting for array types,
Eric Blake <=
- [Qemu-devel] [PATCH 28/31] tests/qapi-schema: Cover two more syntax errors, Markus Armbruster, 2015/08/31
- [Qemu-devel] [PATCH 30/31] qapi: Fix errors for non-string, non-dictionary members, Markus Armbruster, 2015/08/31
- [Qemu-devel] [PATCH 29/31] tests/qapi-schema: Cover non-string, non-dictionary members, Markus Armbruster, 2015/08/31
- Re: [Qemu-devel] [PATCH v2 00/26] qapi: Another round of fixes and cleanups, Markus Armbruster, 2015/08/31