app: Print error message when tag cache parsing fails

This commit is contained in:
Martin Nordholts 2009-09-08 08:38:51 +02:00
parent 67847b4aca
commit a8e5dea309
1 changed files with 6 additions and 5 deletions

View File

@ -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);