From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3qae-0004Fp-Q3 for qemu-devel@nongnu.org; Fri, 30 Oct 2009 08:28:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3qab-0004DK-2T for qemu-devel@nongnu.org; Fri, 30 Oct 2009 08:28:24 -0400 Received: from [199.232.76.173] (port=53636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3qaa-0004DD-R8 for qemu-devel@nongnu.org; Fri, 30 Oct 2009 08:28:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64849) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3qaa-0003TL-Cl for qemu-devel@nongnu.org; Fri, 30 Oct 2009 08:28:20 -0400 Date: Fri, 30 Oct 2009 10:28:09 -0200 From: Luiz Capitulino Message-ID: <20091030102809.1c520282@doriath> In-Reply-To: <4AEA133A.8010906@redhat.com> References: <1256841750-15228-1-git-send-email-lcapitulino@redhat.com> <4AEA133A.8010906@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC 0/7] QError v1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, hollisb@us.ibm.com, kraxel@redhat.com On Thu, 29 Oct 2009 23:12:10 +0100 Paolo Bonzini 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.