[libvirt] [PATCH] conf: Always use VIR_ERR_XML_ERROR on enumFromString() failures

Daniel P. Berrange berrange at redhat.com
Fri Jan 10 17:15:50 UTC 2014


On Fri, Jan 10, 2014 at 06:13:21PM +0100, Christophe Fergeau wrote:
> Currently, during XML parsing, when a call to a FromString() function to
> get an enum value fails, the error which is reported is either
> VIR_ERR_CONFIG_UNSUPPORTED, VIR_ERR_INTERNAL_ERROR or VIR_ERR_XML_ERROR.
> 
> This commit makes such conversion failures consistently return
> VIR_ERR_XML_ERROR

Nice cleanup, but we should use CONFIG_UNSUPPORTED as that has pretty
clearly defined semantics.  The INTERNAL_ERROR / XML_ERROR codes are
far too generic to have useful semantics

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list