From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzvRw-0005P9-6h for qemu-devel@nongnu.org; Mon, 19 Oct 2009 12:51:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzvRr-0005Np-01 for qemu-devel@nongnu.org; Mon, 19 Oct 2009 12:51:11 -0400 Received: from [199.232.76.173] (port=33387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzvRq-0005Nm-PD for qemu-devel@nongnu.org; Mon, 19 Oct 2009 12:51:06 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:53832) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MzvRq-0004rF-9T for qemu-devel@nongnu.org; Mon, 19 Oct 2009 12:51:06 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e39.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id n9JGj0pd025678 for ; Mon, 19 Oct 2009 10:45:00 -0600 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9JGohuL098936 for ; Mon, 19 Oct 2009 10:50:45 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id n9JGqBYf010943 for ; Mon, 19 Oct 2009 10:52:11 -0600 From: Hollis Blanchard In-Reply-To: <4ADB0775.8070404@redhat.com> References: <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> <4AD78CCD.6030006@us.ibm.com> <1255641511.29192.68.camel@slab.beaverton.ibm.com> <4AD793C6.9060508@us.ibm.com> <20091018042550.GH15656@shareable.org> <4ADB0775.8070404@redhat.com> Content-Type: text/plain Date: Mon, 19 Oct 2009 09:50:40 -0700 Message-Id: <1255971040.13995.49.camel@slab.beaverton.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 6/9] QError: Add qdev not found error List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , kraxel@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino 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 sites. > > That's true. However here we have the case of having errors consumed by > programs as well as users, so we want something that can be easily made > into language bindings. > > In other words, this situation is much more similar to errno/strerror, > than to a compiler error message (which will often be used by other > programs, but where the actual error text will be read by a person; this > can and should use gettext). So to extend your analogy, I think we're reaching the conclusion that both errno *and* string should be returned to the client, right? The client can localize based on errno, and in addition optionally provide the server-provided string to the user. -- Hollis Blanchard IBM Linux Technology Center