qemu-e2k/include
Markus Armbruster 4b5766488f error: Fix use of error_prepend() with &error_fatal, &error_abort
From include/qapi/error.h:

  * Pass an existing error to the caller with the message modified:
  *     error_propagate(errp, err);
  *     error_prepend(errp, "Could not frobnicate '%s': ", name);

Fei Li pointed out that doing error_propagate() first doesn't work
well when @errp is &error_fatal or &error_abort: the error_prepend()
is never reached.

Since I doubt fixing the documentation will stop people from getting
it wrong, introduce error_propagate_prepend(), in the hope that it
lures people away from using its constituents in the wrong order.
Update the instructions in error.h accordingly.

Convert existing error_prepend() next to error_propagate to
error_propagate_prepend().  If any of these get reached with
&error_fatal or &error_abort, the error messages improve.  I didn't
check whether that's the case anywhere.

Cc: Fei Li <fli@suse.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20181017082702.5581-2-armbru@redhat.com>
2018-10-19 14:51:34 +02:00
..
block nbd: fix NBD_FLAG_SEND_CACHE value 2018-10-04 09:08:56 -05:00
chardev chardev: mark the calls that allow an implicit mux monitor 2018-10-03 14:45:05 +04:00
crypto tests: call qcrypto_init instead of gnutls_global_init 2018-07-24 17:33:39 +01:00
disas RISC-V Disassembler 2018-03-07 08:30:28 +13:00
exec memory: Remove old_mmio accessors 2018-10-02 19:09:14 +02:00
fpu softfloat: Specialize udiv_qrnnd for ppc64 2018-10-05 12:57:41 -05:00
hw net: cadence_gem: Add support for selecting the DMA MemoryRegion 2018-10-16 17:13:49 +01:00
io qio: non-default context for TLS handshake 2018-03-06 10:19:07 +00:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration vmstate.h: Provide VMSTATE_UINT16_SUB_ARRAY 2018-08-14 17:17:20 +01:00
monitor qdev-monitor: print help to stdout 2018-10-05 16:14:22 +04:00
net net: Remove the deprecated -tftp, -bootp, -redir and -smb options 2018-08-31 09:53:03 +02:00
qapi error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
qemu qemu/compiler: Wrap __attribute__((flatten)) in a macro 2018-10-17 08:36:28 +02:00
qom cpu: Provide a proper prototype for target_words_bigendian() in a header 2018-10-17 08:41:43 +02:00
scsi pr-manager: add query-pr-managers QMP command 2018-06-28 19:05:35 +02:00
standard-headers linux-headers: update 2018-10-12 11:32:18 +02:00
sysemu replay: wake up vCPU when replaying 2018-10-02 19:08:51 +02:00
ui ui: remove support for GTK2 in favour of GTK3 2018-10-12 15:22:18 +02:00
elf.h elf: Fix comments to EF_MIPS_MACH_xxx constants 2018-10-18 20:37:20 +02:00
glib-compat.h glib: enforce the minimum required version and warn about old APIs 2018-06-29 12:22:28 +01:00
qemu-common.h qemu-common.h: update copyright date to 2018 2018-10-16 17:52:06 +02:00
qemu-io.h qemu-io: Let command functions return error code 2018-06-11 16:18:45 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00