|
From: | Eric Blake |
Subject: | Re: [Qemu-devel] [PATCH 22/56] json: Report first rather than last parse error |
Date: | Fri, 10 Aug 2018 10:25:26 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
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 <address@hidden> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |