From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyXOs-0002rL-IY for qemu-devel@nongnu.org; Thu, 15 Oct 2009 16:58:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyXOo-0002pV-11 for qemu-devel@nongnu.org; Thu, 15 Oct 2009 16:58:18 -0400 Received: from [199.232.76.173] (port=39630 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyXOn-0002pS-U8 for qemu-devel@nongnu.org; Thu, 15 Oct 2009 16:58:13 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:39123) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MyXOn-0002Tv-Jl for qemu-devel@nongnu.org; Thu, 15 Oct 2009 16:58:13 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e2.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n9FKolwO016810 for ; Thu, 15 Oct 2009 16:50:47 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9FKvpE7807134 for ; Thu, 15 Oct 2009 16:57:54 -0400 Received: from d01av01.pok.ibm.com (d03av01 [127.0.0.1]) by d01av01.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id n9FKvpQb031508 for ; Thu, 15 Oct 2009 16:57:51 -0400 Message-ID: <4AD78CCD.6030006@us.ibm.com> Date: Thu, 15 Oct 2009 15:57:49 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 6/9] QError: Add qdev not found error References: <1255453026-18637-1-git-send-email-lcapitulino@redhat.com> <1255453026-18637-7-git-send-email-lcapitulino@redhat.com> <1255561330.29192.2.camel@slab.beaverton.ibm.com> <20091015103405.591e2f3b@doriath> <1255626960.29192.7.camel@slab.beaverton.ibm.com> <20091015145208.1d871f09@doriath> <1255630433.29192.16.camel@slab.beaverton.ibm.com> <20091015160839.7dbef5bf@doriath> <1255637617.29192.59.camel@slab.beaverton.ibm.com> In-Reply-To: <1255637617.29192.59.camel@slab.beaverton.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: hollisb@linux.vnet.ibm.com Cc: kraxel@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino >>> Aside from that, we should certainly be able to change the pretty text, >>> for example, to provide additional clarification to the user. The >>> machine-interpreted code, on the other hand, wouldn't change. >>> >> How do you plan to do it in the design you're proposing? If you >> use the text from qemu_error() to build the user and protocol >> outputs, then you can't change it. >> > > Today it looks like this: > C: open host USB device foo > S: error 404, host USB device foo is already open > > Tomorrow it could look like this: > C: open host USB device foo > S: error 404, host USB device foo is already open by PID 27 > What's tough about this sort of error handling is that it's not conducive to localization. It's not unusual for the server to have a different locale than the client so you really need the client to be able to translate error messages into meaningful messages in the client locale. This is the typical argument for highly structured error reporting. -- Regards, Anthony Liguori