Change the order in which some error conditions are checked to improve

* glib/gmarkup.c (g_markup_parse_context_parse): Change the
        order in which some error conditions are checked to improve
        error messages. (#69646)
This commit is contained in:
Matthias Clasen 2002-01-30 22:14:16 +00:00
parent bb031c2e79
commit fc0aea182c
9 changed files with 61 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1,3 +1,9 @@
2002-01-29 Matthias Clasen <matthiasc@poet.de>
* glib/gmarkup.c (g_markup_parse_context_parse): Change the
order in which some error conditions are checked to improve
error messages. (#69646)
Tue Jan 29 15:04:31 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13

View File

@ -1385,7 +1385,19 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
close_name = g_string_free (context->partial_chunk, FALSE);
context->partial_chunk = NULL;
if (context->tag_stack == NULL)
if (*context->iter != '>')
{
gchar buf[7];
set_error (context,
error,
G_MARKUP_ERROR_PARSE,
_("'%s' is not a valid character following "
"the close element name '%s'; the allowed "
"character is '>'"),
utf8_str (context->iter, buf),
close_name);
}
else if (context->tag_stack == NULL)
{
set_error (context,
error,
@ -1404,18 +1416,6 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
close_name,
current_element (context));
}
else if (*context->iter != '>')
{
gchar buf[7];
set_error (context,
error,
G_MARKUP_ERROR_PARSE,
_("'%s' is not a valid character following "
"the close element name '%s'; the allowed "
"character is '>'"),
utf8_str (context->iter, buf),
close_name);
}
else
{
GError *tmp_error;