On Mon, May 19, 2014 at 06:02:26PM -0400, Cole Robinson wrote:
RaiseErrorFull does not prepend the static error code string (like
INVALID_ARG yields "invalid arg: %(msg)s"). We should be using
ReportErrorHelper.
The generated error objects are slightly different, by not storing the
invalid argument name in err->str2. However those fields aren't used
anywhere else and aren't documented to contain anything useful, so
I don't think it matters.
This was actually intentional when I created these helpers, since IMHO
the string concatenation between the caller supplied error message and
the virErrorMsg funtion leads to fugly error messages. So the intent
was that these helper macros would provide the complete error message
that's relevant to their usage, and ignore virErrorMsg.
IOW, I don't think adding a 'invalid argument: ' prefix to these
helper macros is particularly useful.
Regards,
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 :|