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;
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 */