[libvirt] [PATCH] [2/6] Add an error module and message for the hooks subsystem
Eric Blake
eblake at redhat.com
Fri Mar 26 16:16:37 UTC 2010
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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100326/64563037/attachment-0001.sig>
More information about the libvir-list
mailing list