[libvirt] [PATCH 2/3] datatypes: avoid redundant __FUNCTION__

Chris Lalancette clalance at redhat.com
Wed May 12 14:04:37 UTC 2010


On 05/12/2010 09:54 AM, Dave Allan wrote:
>> Unrelated to your patch I suggest that we unify the string
>> representations for error codes to a common style:
>>
>>         case VIR_ERR_INVALID_ARG:
>>             if (info == NULL)
>>                 errmsg = _("invalid argument");
>>             else
>>                 errmsg = _("invalid argument: %s");
>>             break;
>>
>>         case VIR_ERR_XML_ERROR:
>>             if (info == NULL)
>>                 errmsg = _("XML description not well formed or invalid");
>>             else
>>                 errmsg = _("XML description not well formed or invalid: %s");
>>             break;
>>
>> And adapt the callers.
> 
> +1
> 
> A common style for error messages is the right way to go, and I like
> the style Matthias proposes of

Yeah, I also agree, and I would like to see this cleanup as well.  Hopefully
it will lead to clearer error messages from libvirt.

-- 
Chris Lalancette




More information about the libvir-list mailing list