|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | [Qemu-devel] error reporting in functions |
Date: | Wed, 12 Oct 2016 18:47:53 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
HI all!My questions is: what are general recommendations in Qemu for return code, if we have Error **errp? What should I prefer: errp, duplicated by int return code, or void functions with errp?
void + errp seems good, just to not duplicate things. But it has a disadvantage of necessity of "local_err" and "error_propagate" in caller function, if its behaviour depends on callee function success...
-- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |