On 01/31/13 16:54, Peter Maydell wrote:
> On 31 January 2013 15:42, Laszlo Ersek <ler...@redhat.com> wrote:
>> When searching for a bus by name, lookup failure means different things
>> for qbus_find_bus() and qbus_find_recursive(); distinguish them by error
>> codes as well.
>>
>> Signed-off-by: Laszlo Ersek <ler...@redhat.com>
>> ---
>>  include/qapi/qmp/qerror.h |    3 +++
>>  hw/qdev-monitor.c         |    2 +-
>>  2 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
>> index 6c0a18d..940ac21 100644
>> --- a/include/qapi/qmp/qerror.h
>> +++ b/include/qapi/qmp/qerror.h
>> @@ -69,6 +69,9 @@ void assert_no_error(Error *err);
>>  #define QERR_BUS_NOT_FOUND \
>>      ERROR_CLASS_GENERIC_ERROR, "Bus '%s' not found"
>>
>> +#define QERR_BUS_WITH_SLOTS_NOT_FOUND \
>> +    ERROR_CLASS_GENERIC_ERROR, "No bus called '%s' with free slots was 
>> found"
>> +
> 
> I thought we weren't adding any new QERR errors any more?

How do you intend to inform the user about new error situations? If
error codes are a fixed set, then we need either a facility for freely
extending text in the error object, or for stacking separate messages in
the error object.

Thanks
Laszlo

Reply via email to