From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbb93-00069q-PX for qemu-devel@nongnu.org; Fri, 16 Dec 2011 12:00:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rbb8w-0006wP-Jg for qemu-devel@nongnu.org; Fri, 16 Dec 2011 12:00:29 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:56877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rbb8w-0006wL-DB for qemu-devel@nongnu.org; Fri, 16 Dec 2011 12:00:22 -0500 Received: by ghbg19 with SMTP id g19so2945916ghb.4 for ; Fri, 16 Dec 2011 09:00:21 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4EEB791C.9060302@redhat.com> Date: Fri, 16 Dec 2011 18:00:12 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1324036918-2405-1-git-send-email-pbonzini@redhat.com> <1324036918-2405-6-git-send-email-pbonzini@redhat.com> <4EEB4EE1.5030807@codemonkey.ws> <4EEB4F3D.3000006@redhat.com> In-Reply-To: <4EEB4F3D.3000006@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/8] qom: introduce QERR_PROPERTY_VALUE_OUT_OF_RANGE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org On 12/16/2011 03:01 PM, Paolo Bonzini wrote: >> >> I'd rather use generic errors when possible. How about >> VALUE_OUT_OF_RANGE and we can make the message "'%(item)' doesn't take >> value..." and pass "%s.%s" % (device, property) for item. > > Ok. I didn't do this in the end for two reasons. First, that it is inconsistent with other errors from qdev properties. Current master does not raise them when properties are accessed via QOM, but my revised series does. Second, that it is actually provides less structured information. There's no reason why a client should be expected to "know" that %(item) is in that form. Paolo