[Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Paolo Bonzini
On 10/19/2009 06:50 PM, Hollis Blanchard wrote: On Sun, 2009-10-18 at 14:17 +0200, Paolo Bonzini wrote: On 10/18/2009 06:25 AM, Jamie Lokier wrote: The manual for GNU gettext explains quite well why gettext takes a message string as argument, instead of a "message code". Imho, a similar case c

[Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Hollis Blanchard
On Sun, 2009-10-18 at 14:17 +0200, Paolo Bonzini wrote: > On 10/18/2009 06:25 AM, Jamie Lokier wrote: > > The manual for GNU gettext explains quite well why gettext takes a > > message string as argument, instead of a "message code". Imho, a > > similar case can be made for error messages at call

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Daniel P. Berrange
On Mon, Oct 19, 2009 at 10:28:17AM -0200, Luiz Capitulino wrote: > On Mon, 19 Oct 2009 11:25:19 +0100 > "Daniel P. Berrange" wrote: > > > On Fri, Oct 16, 2009 at 10:05:44AM -0300, Luiz Capitulino wrote: > > > On Fri, 16 Oct 2009 10:06:10 +0200 > > > Paolo Bonzini wrote: > > > > > > > On 10/16/2

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Luiz Capitulino
On Mon, 19 Oct 2009 11:25:19 +0100 "Daniel P. Berrange" wrote: > On Fri, Oct 16, 2009 at 10:05:44AM -0300, Luiz Capitulino wrote: > > On Fri, 16 Oct 2009 10:06:10 +0200 > > Paolo Bonzini wrote: > > > > > On 10/16/2009 12:44 AM, Hollis Blanchard wrote: > > > > How about this (basically what Paol

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-19 Thread Daniel P. Berrange
On Fri, Oct 16, 2009 at 10:05:44AM -0300, Luiz Capitulino wrote: > On Fri, 16 Oct 2009 10:06:10 +0200 > Paolo Bonzini wrote: > > > On 10/16/2009 12:44 AM, Hollis Blanchard wrote: > > > How about this (basically what Paolo suggested): > > > > > > { "error": { "code": 12, > > > "desc"

[Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-18 Thread Paolo Bonzini
On 10/18/2009 06:25 AM, Jamie Lokier wrote: The manual for GNU gettext explains quite well why gettext takes a message string as argument, instead of a "message code". Imho, a similar case can be made for error messages at call sites. That's true. However here we have the case of having error

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-17 Thread Jamie Lokier
Jamie Lokier wrote: > Paolo Bonzini wrote: > > On 10/15/2009 09:08 PM, Luiz Capitulino wrote: > > >{ "error": { "code": 12 > > > "desc": "device already open", > > > "data": { "bus": 0, "address": 12 } } } > > > > > > Note that this also can be reused by any bus, as the "

Re: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error

2009-10-17 Thread Jamie Lokier
Paolo Bonzini wrote: > On 10/15/2009 09:08 PM, Luiz Capitulino wrote: > >{ "error": { "code": 12 > > "desc": "device already open", > > "data": { "bus": 0, "address": 12 } } } > > > > Note that this also can be reused by any bus, as the "data" information > >is built at e