summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2010-09-27 10:36:11 -0400
committerRyan Lortie <desrt@desrt.ca>2010-10-01 11:21:07 -0400
commitbd290081ff8c7951c6509d0aee23246739a928a2 (patch)
treeaaf92286814889ed5d7a28626fe2a5b6c74f5fa7
parente40f3932dd9d924c3197e98f44950561248297ae (diff)
glib-compile-schemas: improve error accuracy
We wrote "<enum> must contain at least one <value>" for empty <flags>. Fix that.
-rw-r--r--gio/glib-compile-schemas.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index 95770a747..977c71147 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 */