|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 5/8] qom: introduce QERR_PROPERTY_VALUE_OUT_OF_RANGE |
Date: | Fri, 16 Dec 2011 18:00:12 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |