[libvirt] [PATCH] Improve some error messages about unsupported APIs/URIs
Eric Blake
eblake at redhat.com
Tue Jun 22 22:09:12 UTC 2010
On 06/22/2010 03:48 PM, Justin Clift wrote:
> On 06/23/2010 04:16 AM, Matthias Bolte wrote:
>> case VIR_ERR_NO_SUPPORT:
>>>> > if (info == NULL)
>
> Would it be practical to expand this with category messages like?
>
> case VIR_ERR_NO_SUPPORT_STORAGE:
> if (info == NULL)
> errmsg = _("this function is not supported by the storage
> driver");
> ...
>
> case VIR_ERR_NO_SUPPORT_NETWORK:
> if (info == NULL)
> errmsg = _("this function is not supported by the network
> driver");
> ...
>
> Or maybe figure out a "%s" replaceable keyword for
> network/storage/hypervisor/etc above?
The whole error reporting scheme needs some loving care, and I've got a
partial patch series posted to the list earlier that started that
process. But it was deemed less important than getting 0.8.2 finalized
(as well as helping with RHEL-6 backports), so it's been on the back
burner. At this point, a minimally-invasive patch, like Daniel's
proposal, is better than making things better when the code is all going
to be refactored down the road anyways. But thanks for the thought; it
may affect my refactoring efforts!
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100622/7de49708/attachment-0001.sig>
More information about the libvir-list
mailing list