From a8e5dea3092bb487bf1268e486ad30b7416a274d Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Tue, 8 Sep 2009 08:38:51 +0200 Subject: [PATCH] app: Print error message when tag cache parsing fails --- app/core/gimptagcache.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/core/gimptagcache.c b/app/core/gimptagcache.c index d13aa4abf7..a691ba20f4 100644 --- a/app/core/gimptagcache.c +++ b/app/core/gimptagcache.c @@ -460,16 +460,17 @@ gimp_tag_cache_load (GimpTagCache *cache) markup_parser.error = gimp_tag_cache_load_error; xml_parser = gimp_xml_parser_new (&markup_parser, &parse_data); - if (! gimp_xml_parser_parse_file (xml_parser, filename, &error)) - { - g_printerr ("Failed to parse tag cache.\n"); - } - else + if (gimp_xml_parser_parse_file (xml_parser, filename, &error)) { cache->priv->records = g_array_append_vals (cache->priv->records, parse_data.records->data, parse_data.records->len); } + else + { + g_printerr ("Failed to parse tag cache: %s\n", + error ? error->message : NULL); + } g_free (filename); gimp_xml_parser_free (xml_parser);