glib-compile-schemas: improve error accuracy

We wrote "<enum> must contain at least one <value>" for empty <flags>.
Fix that.
This commit is contained in:
Ryan Lortie 2010-09-27 10:36:11 -04:00
parent e40f3932dd
commit bd290081ff

View File

@ -135,9 +135,10 @@ enum_state_end (EnumState **state_ptr,
*state_ptr = NULL; *state_ptr = NULL;
if (state->strinfo->len == 0) if (state->strinfo->len == 0)
g_set_error_literal (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"<enum> must contain at least one <value>"); "<%s> must contain at least one <value>",
state->is_flags ? "flags" : "enum");
} }
/* Handling of <key> {{{1 */ /* Handling of <key> {{{1 */