Fix error reporting in gmarkup
authorMatthias Clasen <matthiasc@src.gnome.org>
Sun, 6 Mar 2005 20:26:28 +0000 (20:26 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 6 Mar 2005 20:26:28 +0000 (20:26 +0000)
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-8
glib/gmarkup.c

index 1f060a5..172ef92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gmarkup.c: Add G_GNUC_PRINTF attribute
+       to set_error.
+       (g_markup_parse_context_end_parse): Fix an
+       error message, noticed by Tim Janik.
+
 2005-02-24  Tor Lillqvist  <tml@novell.com>
 
        * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute
index 1f060a5..172ef92 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gmarkup.c: Add G_GNUC_PRINTF attribute
+       to set_error.
+       (g_markup_parse_context_end_parse): Fix an
+       error message, noticed by Tim Janik.
+
 2005-02-24  Tor Lillqvist  <tml@novell.com>
 
        * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute
index 1f060a5..172ef92 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gmarkup.c: Add G_GNUC_PRINTF attribute
+       to set_error.
+       (g_markup_parse_context_end_parse): Fix an
+       error message, noticed by Tim Janik.
+
 2005-02-24  Tor Lillqvist  <tml@novell.com>
 
        * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute
index 1f060a5..172ef92 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gmarkup.c: Add G_GNUC_PRINTF attribute
+       to set_error.
+       (g_markup_parse_context_end_parse): Fix an
+       error message, noticed by Tim Janik.
+
 2005-02-24  Tor Lillqvist  <tml@novell.com>
 
        * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute
index 45d75b7..4d7bc9a 100644 (file)
@@ -206,6 +206,12 @@ mark_error (GMarkupParseContext *context,
     (*context->parser->error) (context, error, context->user_data);
 }
 
+static void set_error (GMarkupParseContext *context,
+                      GError             **error,
+                      GMarkupError         code,
+                      const gchar         *format,
+                      ...) G_GNUC_PRINTF (4, 5);
+
 static void
 set_error (GMarkupParseContext *context,
            GError             **error,
@@ -1801,7 +1807,7 @@ g_markup_parse_context_end_parse (GMarkupParseContext *context,
     case STATE_INSIDE_CLOSE_TAG_NAME:
       set_error (context, error, G_MARKUP_ERROR_PARSE,
                  _("Document ended unexpectedly inside the close tag for "
-                   "element '%s'"), current_element);
+                   "element '%s'"), current_element (context));
       break;
 
     case STATE_INSIDE_PASSTHROUGH: