Re: [PATCH 3/4] util: Add 'label' field to VIR_ENUM_IMPL

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

 



On Mon, Apr 08, 2019 at 11:48:18AM -0400, Cole Robinson wrote:
> This allows us to raise error messages from virEnum*String functions.
> 
> FromString failure will report this error for value 'zzzz'
> 
>   invalid argument: Unknown 'domain type' value 'zzzz'
> 
> ToString failure will report this error for unknown type=83
> 
>   internal error: Unknown 'domain type' internal value '83'
> 
> However we disable the error reporting for now. It should only be
> enabled when we decide to begin dropping duplicate error reporting.

Why don't we *enable* error reporting now, but only if the label
string is non-NULL. Then just change your second patch to pass
NULL everywhere.  We can then incrementally replace the NULL with
a real message at the same time as we update each caller to drop
the existing error reporting.

This avoids any point in time having double reporting.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

  Powered by Linux