mirror of https://github.com/GNOME/gimp.git
app: Print error message when tag cache parsing fails
This commit is contained in:
parent
67847b4aca
commit
a8e5dea309
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue