Hey, 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. Christophe
Attachment:
pgpJjof5zb9vL.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list