qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] 9p: Print error hints if option parsing fails
Date: Sun, 15 Sep 2019 20:50:32 +0200	[thread overview]
Message-ID: <20190915205032.475e79b8@bahia.lan> (raw)
In-Reply-To: <87o8zm3dr1.fsf@dusky.pond.sub.org>

On Sat, 14 Sep 2019 20:59:46 +0200
Markus Armbruster <armbru@redhat.com> wrote:

> Greg Kurz <groug@kaod.org> writes:
> 
> > Option parsing fonctions are called with &error_fatal, which
> 
> functions
> 
> > causes error_setg() to call exit() and the hints are never
> > printed.
> >
> > Use an intermediate error object so that exit() happens in
> > error_propagate() after error_append_hint() could be called.
> 
> Hmm.
> 
> Code that creates error objects should not need to know how they are
> handled.
> 

Agreed.

> Your patch shows that error_append_hint() requires error_propagate() to
> work regardless of how the error is handled.  We should amend
> error_append_hint()'s contract in error.h to spell this out, and search
> the tree for more misuse of error_append_hint().

Sure. I'll take care of that.

Cheers,

--
Greg


      reply	other threads:[~2019-09-15 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 16:36 [Qemu-devel] [PATCH] 9p: Print error hints if option parsing fails Greg Kurz
2019-09-14 18:59 ` Markus Armbruster
2019-09-15 18:50   ` Greg Kurz [this message]

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=20190915205032.475e79b8@bahia.lan \
    --to=groug@kaod.org \
    --cc=armbru@redhat.com \
    --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).