[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 00/10]: QError v4

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 00/10]: QError v4
Date: Mon, 23 Nov 2009 07:11:53 -0600
User-agent: Thunderbird (X11/20090825)

Luiz Capitulino wrote:
On Sun, 22 Nov 2009 10:08:16 -0600
Anthony Liguori <address@hidden> wrote:

I'm certainly willing to consider alternative ways to do qmp_error() but taking a free form string is not an option in my mind. It goes against the fundamentals of what we're trying to build with QMP.


So if you're opposed to structured error data, just having qmp_error(error_code) is a reasonable alternative. I don't think it's the right thing to do, but I think it's still within the spirit of the goals of QMP.

 You mean, we would have calls like:

qemu_error_new(error_code, 'device '%s' not found', name);

Except drop the 'device %s not found' bit.

 and on the wire:

{ "error": 1234 }

 Did I get it right?

 If so, I can see some problems with it:

1. It's impossible to know what 1234 means by watching the
   protocol on the wire. Although this is a machine protocol,
   this is a good feature

2. We may have errors where having the error data is needed,
   and iirc someone gave an example of this some hundreds
   of emails ago

3. A new error will require a new code. Classes have the
   advantage of becoming stable over time and we'll end up
   just automatically reusing existing ones

Yes, this is why I'm happy with the current state of QError. We address all of these problems nicely :-)


Anthony Liguori

reply via email to

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