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

Re: [libvirt] [PATCH] [2/6] Add an error module and message for the hooks subsystem



On 03/26/2010 09:42 AM, Daniel Veillard wrote:
> @@ -1117,6 +1120,11 @@ virErrorMsg(virErrorNumber error, const char *info)
>                  errmsg = _("Failed to make domain persistent after migration");
>              else
>                  errmsg = _("Failed to make domain persistent after migration: %s");
> +        case VIR_ERR_HOOK_SCRIPT_FAILED:
> +            if (info == NULL)
> +                errmsg = _("Hook script execution failed");
> +            else
> +                errmsg = _("Hook script execution failed: %s");

We don't have a very consistent style.  A quick glance at virErrorMsg
shows that maybe half of the messages start lower-case, and the other
half start upper-case.  GNU style recommends that error messages start
with lower-case letters (unless the first word is an acronym, such as in
the error _("GET operation failed") for VIR_ERR_GET_FAILED), and
although this is not a GNU project, there is something to be said for
consistency.

Is it worth a separate patch to make error message consistently start
with lower-case?  maint.mk even has a syntax-check rule that we can use
to help in this regards (sc_error_message_uppercase), although we are
not currently using it.

At any rate, capitalization can be a separate cleanup patch, so ACK to
this one.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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