From: Peter Xu <peterx@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, peter.maydell@linaro.org,
armbru@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}
Date: Wed, 7 Sep 2016 18:42:14 +0800 [thread overview]
Message-ID: <20160907104214.GA28348@pxdev.xzpeter.org> (raw)
In-Reply-To: <20160907093308.GA5775@lemon>
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
next prev parent reply other threads:[~2016-09-07 10:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 6:06 [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort} Peter Xu
2016-09-07 6:06 ` [Qemu-devel] [PATCH v4 1/4] error-report: provide error_report_fatal() Peter Xu
2016-09-07 6:06 ` [Qemu-devel] [PATCH v4 2/4] error-report: provide error_report_abort() Peter Xu
2016-09-07 6:06 ` [Qemu-devel] [PATCH v4 3/4] error-report: leverage error_report_fatal() Peter Xu
2016-09-07 6:06 ` [Qemu-devel] [PATCH v4 4/4] error-report: leverage error_report_abort() Peter Xu
2016-09-07 6:39 ` [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort} Fam Zheng
2016-09-07 9:23 ` Alex Bennée
2016-09-07 9:33 ` Fam Zheng
2016-09-07 10:42 ` Peter Xu [this message]
2016-09-07 12:39 ` Lluís Vilanova
2016-09-07 13:48 ` Markus Armbruster
2016-09-09 17:05 ` Markus Armbruster
2016-09-09 17:19 ` Daniel P. Berrange
2016-09-12 8:02 ` Markus Armbruster
2016-09-12 5:33 ` Peter Xu
2016-09-12 19:49 ` Eric Blake
2016-09-13 6:44 ` Markus Armbruster
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=20160907104214.GA28348@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).