[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors
Date: Tue, 19 Jan 2016 10:38:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 18.01.2016 21:26, Eric Blake wrote:
> On 01/15/2016 06:54 AM, Lluís Vilanova wrote:
>> Gives some general guidelines for reporting errors in QEMU.
>> Signed-off-by: Lluís Vilanova <address@hidden>
>> ---
>>  HACKING |   36 ++++++++++++++++++++++++++++++++++++
>>  1 file changed, 36 insertions(+)
>> +Functions in this header are used to accumulate error messages in an 'Error'
>> +object, which can be propagated up the call chain where it is finally 
>> reported.
>> +
>> +In its simplest form, you can immediately report an error with:
>> +
>> +    error_setg(&error_fatal, "Error with %s", "arguments");
> This paradigm doesn't appear anywhere in the current code base
> (hw/ppc/spapr*.c has a few cases of error_setg(&error_abort), but
> nothing directly passes error_fatal).  It's a bit odd to document
> something that isn't actually used.

+1 for _not_ documenting this here: IMHO this looks ugly. If we want
something like this, I think we should introduce a proper
error_report_fatal() function instead.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]