[libvirt] [PATCH 2/2] spice: expose the QEMU disable file transfer option

Christophe Fergeau cfergeau at redhat.com
Fri Jan 10 12:29:19 UTC 2014


On Thu, Jan 09, 2014 at 07:21:25AM -0500, Francesco Romani wrote:
> > the code to disable copy&paste uses VIR_ERR_INTERNAL_ERROR when it's not
> > able to parse the enum value, but the compression code uses
> > VIR_ERR_CONFIG_UNSUPPORTED, and the mouse code uses VIR_ERR_XML_ERROR :(
> > The rest of domain_conf.c is not very consistent in what error is reported
> > on unknown enum values :( I'd personnally go with either
> > VIR_ERR_CONFIG_UNSUPPORTED or VIR_ERR_XML_ERROR as they are more specific
> > than VIR_ERR_INTERNAL_ERROR. However, given that the rest of the code is
> > inconsistent, this can stay this way for now, and be fixed up at a later
> > time.
> I already have to resubmit, and I personally like errors to be specific,
> so I will change to VIR_ERR_CONFIG_UNSUPPORTED, because it seems the most
> relevant.

Fwiw, I was thinking a bit more about this, and I'd tend to use
VIR_ERR_CONFIG_UNSUPPORTED as meaning "libvirt knows about this enum value,
but cannot handle it for some reason" vs VIR_ERR_XML_ERROR meaning "this
document cannot be parsed because this enum value is invalid/unknown".
So my preference here would go to VIR_ERR_XML_ERROR.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140110/514df5d8/attachment-0001.sig>

More information about the libvir-list mailing list