[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set()
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set() |
Date: |
Thu, 26 Jul 2012 11:45:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Am 26.07.2012 04:43, schrieb Anthony Liguori:
> Luiz Capitulino <address@hidden> writes:
>
>> Basically, this series changes a call like:
>>
>> error_set(errp, QERR_DEVICE_NOT_FOUND, device);
>>
>> to:
>>
>> error_set(errp, QERR_DEVICE_NOT_FOUND,
>> "Device 'device=%s' not found", device);
>>
>> In the first call, QERR_DEVICE_NOT_FOUND is a string containing a json dict:
>>
>> "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"
>
> This is the wrong direction. Looking through the patch, this makes the
> code much more redundant overall. You have dozens of calls that are
> duplicating the same error message. This is not progress.
I believe this is mostly because it's a mechanical conversion. Once this
is done, we can change error messages to better fit the individual cases.
> We should just stick with a simple QERR_GENERIC and call it a day.
> Let's not needlessly complicate existing code.
Why even have error codes when everything should become QERR_GENERIC? Or
am I misunderstanding?
Kevin
- [Qemu-devel] [PATCH 08/14] qerror: add build_error_dict() and error_object_table[], (continued)
- [Qemu-devel] [PATCH 08/14] qerror: add build_error_dict() and error_object_table[], Luiz Capitulino, 2012/07/25
- [Qemu-devel] [PATCH 09/14] qerror: qerror_report(): take an index and a human error message, Luiz Capitulino, 2012/07/25
- [Qemu-devel] [PATCH 11/14] qerror: drop qerror_table[] for good, Luiz Capitulino, 2012/07/25
- [Qemu-devel] [PATCH 12/14] error: turn QERR_ macros into an enumeration, Luiz Capitulino, 2012/07/25
- [Qemu-devel] [PATCH 13/14] qerror: change all qerror_report() calls to use the ErrClass enum, Luiz Capitulino, 2012/07/25
- [Qemu-devel] [PATCH 10/14] error: error_set(): take an index and a human error message, Luiz Capitulino, 2012/07/25
- [Qemu-devel] [PATCH 14/14] error: change all error_set() calls to use the ErrClass enum, Luiz Capitulino, 2012/07/25
- Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set(), Anthony Liguori, 2012/07/25
- Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set(),
Kevin Wolf <=
- Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set(), Kevin Wolf, 2012/07/26
- Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set(), Anthony Liguori, 2012/07/26
Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set(), Daniel P. Berrange, 2012/07/26
Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set(), Markus Armbruster, 2012/07/26