From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, mreitz@redhat.com,
kwolf@redhat.com, pbonzini@redhat.com, den@openvz.org
Subject: Re: [Qemu-devel] [PATCH 1/3] error: add error_get_hint
Date: Tue, 18 Dec 2018 14:50:22 -0600 [thread overview]
Message-ID: <bdb0c306-763c-82ee-c168-93edb8c763b8@redhat.com> (raw)
In-Reply-To: <20181102151152.288399-2-vsementsov@virtuozzo.com>
On 11/2/18 10:11 AM, Vladimir Sementsov-Ogievskiy wrote:
> Add a function to export error hint - a pair to error_get_pretty. It's
> needed to handle errors by hand, where we can't just report it or
> propagate.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> include/qapi/error.h | 5 +++++
> util/error.c | 5 +++++
> 2 files changed, 10 insertions(+)
I'll have to see how this is used before agreeing to it, but the code
itself is fine if the series does indeed warrant it. I wouldn't mind
Markus chiming in on the topic, either.
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> +const char *error_get_hint(const Error *err)
> +{
> + return err->hint ? err->hint->str : NULL;
> +}
> +
> void error_report_err(Error *err)
> {
> error_report("%s", error_get_pretty(err));
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-12-18 20:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 15:11 [Qemu-devel] [PATCH 0/3] nbd-client: drop extra error noise Vladimir Sementsov-Ogievskiy
2018-11-02 15:11 ` [Qemu-devel] [PATCH 1/3] error: add error_get_hint Vladimir Sementsov-Ogievskiy
2018-12-18 20:50 ` Eric Blake [this message]
2018-11-02 15:11 ` [Qemu-devel] [PATCH 2/3] nbd: publish _lookup functions Vladimir Sementsov-Ogievskiy
2018-12-18 20:53 ` Eric Blake
2018-11-02 15:11 ` [Qemu-devel] [PATCH 3/3] block/nbd-client: use traces instead of noisy error_report_err Vladimir Sementsov-Ogievskiy
2018-12-18 21:23 ` Eric Blake
2018-12-18 22:14 ` Eric Blake
2018-12-12 8:56 ` [Qemu-devel] ping Re: [PATCH 0/3] nbd-client: drop extra error noise Vladimir Sementsov-Ogievskiy
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=bdb0c306-763c-82ee-c168-93edb8c763b8@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).