[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qapi: give available enum values in error string
From: |
Markus Armbruster |
Subject: |
Re: [PATCH] qapi: give available enum values in error string |
Date: |
Tue, 07 Mar 2023 15:28:24 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
[...]
> We hit an interesting limit of the API though, because error_setg() with
> &error_fatal will fail immediately before append_hint().
>
> But we can work around it by using a ERRP_GUARD() !
error.h again:
* Create an error and add additional explanation:
* error_setg(errp, "invalid quark");
* error_append_hint(errp, "Valid quarks are up, down, strange, "
* "charm, top, bottom.\n");
---> * This may require use of ERRP_GUARD(); more on that below.
;)
> sending v2
Thanks!