qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}
Date: Wed, 07 Sep 2016 15:48:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Lluís Vilanova <address@hidden> writes:

> Fam Zheng writes:
>
>> On Wed, 09/07 10:23, Alex Bennée wrote:
>>> Last time I needed to do error reporting I was told the error_setg
>>> method was the correct way to do it and the report/exit case made sense
>>> only in the top level. Before we add even more error reporting
>>> primitives can we update HACKING (or possibly add somethings to docs/)
>>> that describes when and where the various error report mechanisms should
>>> be used?
>
>> FWIW, the comment of error_setg clarifies the recommended usage now:
>
>> ...
>>> * Please don't error_setg(&error_fatal, ...), use error_report() and
>>> * exit(), because that's more obvious.
>>> * Likewise, don't error_setg(&error_abort, ...), use assert().
>>> */
>>> #define error_setg(errp, fmt, ...)                              \
>> ...
>
> Doesn't this series then contradict this comment?

Yes, but I asked Peter for it:

    Regarding error_report_abort(): in my opinion, printing pretty
    messages right before abort() is largely a waste of time.  But if
    people insist on doing it, then the error subsystem may have to
    support it.  Would you be willing to track down such usage, so we
    can make an informed decision?

http://lists.gnu.org/archive/html/qemu-devel/2016-08/msg02930.html



reply via email to

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