qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Fixing the error failure
Date: Wed, 20 Jun 2012 17:13:13 -0300	[thread overview]
Message-ID: <20120620171313.2d13aae6@doriath.home> (raw)
In-Reply-To: <4FE228C2.20800@codemonkey.ws>

On Wed, 20 Jun 2012 14:47:14 -0500
Anthony Liguori <anthony@codemonkey.ws> wrote:

> > I'm not sure this is better because it suggests that all classes we have today
> > are still valid.
> 
> Yes, they are still valid.  We cannot and should not change any of the error 
> behavior we have today.

We can keep them and do the new way only for new commands.

> > My main goal is to simplify,
> 
> My main goal is to get rid of all the printf() droppings we have scattered 
> through the code base.  There is absolutely not benefit in touching the current 
> users of Error.  They work fine.  We need to focus our attention on cleaning up 
> the crap that we have left.

We're talking about two different problems.

First, I agree about the issue with printf() and also agree about GenericError
being a solution to fix that. Although it's not clear to me how 'domain' should
be used and maybe we could extend UndefinedError to contain a user string and
use that instead.

The second problem is the 'rich error reporting has failed' one. This proposal
tries to address that. Declaring the current errors as deprecated doesn't
require us changing current users.

> > Also, maybe it's just how I'm interpreting it, but GenericError reminds of
> > UndefinedError in the sense that we'd prefer commands to use more specific
> > errors instead.
> 
> Using strings mean that errors are basically useless from a programmatic 
> perspective.  So yeah, it's just like using UndefinedError.  Except we may have 
> a few additional kinds of "UndefinedErrors" by having domains.
> 
> > I'm fine with keeping the current code, but I think this proposal overly
> > simplifies something that we're already overdoing.
> 
> We have something that works--why should we change it in any way?  There's no 
> maintenance burden here.

Because it got too complicated. We have 70+ error classes and a lot to come
with keep the current way.  It's already very difficult to choose the correct
class for an error and I don't doubt clients have a similar trouble in their end.
Besides, several errors are missing information to be really useful, like the
errno discussion.

I agree the burden is very little to maintain the current errors and I'm fine
with it, but I think we should move away from having hundreds of not so useful
classes.

  reply	other threads:[~2012-06-20 20:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1338387301-10074-1-git-send-email-lcapitulino@redhat.com>
     [not found] ` <1338387301-10074-3-git-send-email-lcapitulino@redhat.com>
     [not found]   ` <4FC74B1A.8080700@redhat.com>
     [not found]     ` <20120531110608.4dc3fe22@doriath.home>
     [not found]       ` <4FC77F6C.8000008@redhat.com>
     [not found]         ` <20120531113127.1c8aa213@doriath.home>
     [not found]           ` <4FC78637.4040605@redhat.com>
     [not found]             ` <20120531124411.659ed161@doriath.home>
     [not found]               ` <4FC79316.6080603@redhat.com>
     [not found]                 ` <20120531130814.5779aae9@doriath.home>
2012-06-01 12:40                   ` [Qemu-devel] [PATCH 02/14] qerror: add new errors Kevin Wolf
2012-06-13 17:49             ` [Qemu-devel] Adding errno to QMP errors Luiz Capitulino
2012-06-15 14:46               ` Luiz Capitulino
2012-06-15 16:52               ` Anthony Liguori
2012-06-15 16:55                 ` Paolo Bonzini
2012-06-15 17:48                   ` Anthony Liguori
2012-06-15 19:11                     ` Paolo Bonzini
2012-06-15 17:02                 ` Luiz Capitulino
2012-06-15 17:23                   ` Kevin Wolf
2012-06-15 17:03                 ` Daniel P. Berrange
2012-06-18 15:41                   ` Markus Armbruster
2012-06-18 18:31                     ` Anthony Liguori
2012-06-19  7:39                       ` Kevin Wolf
2012-06-19  9:20                         ` Daniel P. Berrange
2012-06-19  9:31                           ` Kevin Wolf
2012-06-19 13:12                       ` Luiz Capitulino
2012-06-20 17:48                         ` [Qemu-devel] [RFC] Fixing the error failure Luiz Capitulino
2012-06-20 18:46                           ` Anthony Liguori
2012-06-20 19:40                             ` Luiz Capitulino
2012-06-20 19:47                               ` Anthony Liguori
2012-06-20 20:13                                 ` Luiz Capitulino [this message]
2012-06-21 12:42                           ` Daniel P. Berrange
     [not found]                             ` <20120625165651.31f9e0bd@doriath.home>
     [not found]                               ` <m34npyld8y.fsf@blackfin.pond.sub.org>
     [not found]                                 ` <20120626093511.GD14451@redhat.com>
     [not found]                                   ` <m3hatyco9g.fsf@blackfin.pond.sub.org>
     [not found]                                     ` <4FE9E275.40303@codemonkey.ws>
     [not found]                                       ` <m3txxvq3i3.fsf@blackfin.pond.sub.org>
2012-07-02 12:47                                         ` Anthony Liguori
2012-07-02 13:47                                           ` Luiz Capitulino
2012-07-02  8:03                           ` Paolo Bonzini

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=20120620171313.2d13aae6@doriath.home \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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).