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 <vilan...@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
signature.asc
Description: OpenPGP digital signature