[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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


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.


Attachment: pgpqKy3W9VnFr.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]