qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [RFC 0/7] QError v1


From: Luiz Capitulino
Subject: [Qemu-devel] Re: [RFC 0/7] QError v1
Date: Fri, 30 Oct 2009 10:28:09 -0200

On Thu, 29 Oct 2009 23:12:10 +0100
Paolo Bonzini <address@hidden> wrote:

> >   A last note: this series is on top of the (to be merged) QJSon module,
> > that's why it's a RFC and.. I didn't test it too much. :)
> 
> I have just two comments:
> 
> 1) you do
> 
> > -        qemu_error("Device \"%s\" not found.  Try -device '?' for a 
> > list.\n",
> > -                   driver);
> > +        qemu_error_structed(QERR_DEV_NFOUND, "{ 'name': %s }", driver);
> 
> why not store the "{ 'name': %s }" in the qerror_table?  I guess you 
> plan to have different fields in some cases?

 The main reason is to have syntax checking, we can declare it in a
macro though, in case of generic errors which are going to be used in
other places.

> 2) as I understood it, the consensus was to store the expanded error 
> message (i.e. qerror_print) in the JSON output as well.  That would 
> involve returning a QString from qerror_print, I guess.

 Really? I thought the consensus was to send only an error code
and error data.

 I'm ok with either way, although I don't think a user targeted string
is going to be that useful.




reply via email to

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