|
From: | Eric Blake |
Subject: | Re: [PATCH 12/13] qapi: Only input visitors can actually fail |
Date: | Thu, 23 Apr 2020 13:31:50 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 4/23/20 11:00 AM, Markus Armbruster wrote:
The previous few commits have made this more obvious, and removed the one exception. Time to clarify the documentation, and drop dead error checking. Signed-off-by: Markus Armbruster <address@hidden> ---
I guess the only other failures an output visitor might encounter are out-of-memory, or invalid contents (such as a NaN in a 'number', or invalid encoding in a string...), and aborting on those errors at the point they happen rather than trying to return errp makes sense.
It makes for a nice conceptual result: input parsing fails on unexpected input, but output visitors should never be used on invalid data.
Reviewed-by: Eric Blake <address@hidden> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |