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: Peter Xu
Subject: Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}
Date: Wed, 7 Sep 2016 18:42:14 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Sep 07, 2016 at 05:33:08PM +0800, Fam Zheng wrote:
> 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, ...)                              \

I can update both HACKING and above comment to mention about the new
interface in v5 (if we will have a v5) by appending a new patch for
the docs. Otherwise, I can post the patch seperately when needed.

Thanks,

-- peterx



reply via email to

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