Am 26.07.2012 04:43, schrieb Anthony Liguori: > Luiz Capitulino <[email protected]> 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
