On 08/08/2018 07:03 AM, Markus Armbruster wrote:
Quiz time!  When a parser reports multiple errors, but the user gets
to see just one, which one is (on average) the least useful one?


Reproducer: feeding

     {"abc\xC2ijk": 1}\n

to QMP produces

     {"error": {"class": "GenericError", "desc": "JSON parse error, key is not a 
string in object"}}

Report the first error instead.  The reproducer now produces

     {"error": {"class": "GenericError", "desc": "JSON parse error, invalid UTF-8 
sequence in string"}}

Yes, definite improvement.

Reviewed-by: Eric Blake <ebl...@redhat.com>

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

Reply via email to