From 0d0698b9ccc23fe3d8d6170bc8fc8bac6bba983b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 6 Mar 2005 20:26:28 +0000 Subject: [PATCH] Fix error reporting in gmarkup --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ glib/gmarkup.c | 8 +++++++- 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1f060a514..172ef9295 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-03-06 Matthias Clasen + + * 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 * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1f060a514..172ef9295 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-03-06 Matthias Clasen + + * 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 * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 1f060a514..172ef9295 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +2005-03-06 Matthias Clasen + + * 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 * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1f060a514..172ef9295 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2005-03-06 Matthias Clasen + + * 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 * glib/Makefile.am (BUILT_EXTRA_DIST): Don't distribute diff --git a/glib/gmarkup.c b/glib/gmarkup.c index 45d75b705..4d7bc9ade 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -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: