Re: [PATCH v2 1/3] virerror: Fix incorrect use of RaiseErrorFull

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

 



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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]