qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/19] qapi: Fix broken discriminator error mess


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 10/19] qapi: Fix broken discriminator error messages
Date: Tue, 17 Sep 2019 13:05:41 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/14/19 10:34 AM, Markus Armbruster wrote:
> check_union() checks the discriminator exists in base and makes sense.
> Two error messages mention the base.  These are broken for anonymous
> bases, as demonstrated by tests flat-union-invalid-discriminator and
> flat-union-invalid-if-discriminator.err.  The third one doesn't
> bother.
> 
> First broken when commit ac4338f8eb "qapi: Allow anonymous base for
> flat union" (v2.6.0) neglected to adjust the "not a member of base"
> error message.  Commit ccadd6bcba "qapi: Add 'if' to implicit struct
> members" (v4.0.0) then cloned the flawed error message.
> 
> Dumb them down not to mention the base.

A trick for good error reporting: deciding when "less is more" :)

> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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