From: Thomas Huth <thuth@redhat.com>
To: "Eric Blake" <eblake@redhat.com>,
"Lluís Vilanova" <vilanova@ac.upc.edu>,
qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors
Date: Tue, 19 Jan 2016 10:38:42 +0100 [thread overview]
Message-ID: <569E0422.8040806@redhat.com> (raw)
In-Reply-To: <569D4A82.5000506@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
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 <vilanova@ac.upc.edu>
>> ---
>> 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.
Thomas
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-01-19 9:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 13:54 [Qemu-devel] [RFC][PATCH v3 ] utils: Improve and document error reporting Lluís Vilanova
2016-01-15 13:54 ` [Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors Lluís Vilanova
2016-01-18 20:26 ` Eric Blake
2016-01-19 9:38 ` Thomas Huth [this message]
2016-01-20 14:10 ` Lluís Vilanova
2016-01-27 12:03 ` Thomas Huth
2016-01-27 19:06 ` Lluís Vilanova
2016-01-27 19:20 ` Lluís Vilanova
2016-01-28 14:27 ` Thomas Huth
2016-01-28 18:31 ` Lluís Vilanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=569E0422.8040806@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.