[glib/glib-2-26] glib-compile-schemas: improve error accuracy
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-26] glib-compile-schemas: improve error accuracy
- Date: Mon, 27 Sep 2010 15:15:11 +0000 (UTC)
commit 2f2eb5cc5df40b25c721d7c39abb7698fe36cbcb
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Sep 27 10:36:11 2010 -0400
glib-compile-schemas: improve error accuracy
We wrote "<enum> must contain at least one <value>" for empty <flags>.
Fix that.
gio/glib-compile-schemas.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index 95770a7..977c711 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -135,9 +135,10 @@ enum_state_end (EnumState **state_ptr,
*state_ptr = NULL;
if (state->strinfo->len == 0)
- g_set_error_literal (error,
- G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
- "<enum> must contain at least one <value>");
+ g_set_error (error,
+ G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
+ "<%s> must contain at least one <value>",
+ state->is_flags ? "flags" : "enum");
}
/* Handling of <key> {{{1 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]