Commit 6e5f6a0b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

improved error message for the special case of store_unknown_tokens ==

2002-11-18  Sven Neumann  <neo@wintermute>

	* app/config/gimpconfig-deserialize.c
	(gimp_config_deserialize_properties): improved error message for
	the special case of store_unknown_tokens == TRUE.
parent 79101957
2002-11-18 Sven Neumann <neo@wintermute>
 
* app/config/gimpconfig-deserialize.c
(gimp_config_deserialize_properties): improved error message for
the special case of store_unknown_tokens == TRUE.
* app/config/gimpconfig.c (gimp_config_add_unknown_token): try to
substitute paths of the form ${foo} in the unknown token value.
 
......
......@@ -183,6 +183,17 @@ gimp_config_deserialize_properties (GObject *object,
g_scanner_set_scope (scanner, old_scope_id);
/* If store_unknown_tokens is TRUE but the unknown token value couldn't
be parsed the default error message is rather confusing.
We try to produce something more meaningful here ... */
if ((store_unknown_tokens &&
token == G_TOKEN_STRING && next == G_TOKEN_IDENTIFIER))
{
g_scanner_unexp_token (scanner, G_TOKEN_SYMBOL, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
return FALSE;
}
return gimp_config_deserialize_return (scanner, token, nest_level);
}
......
......@@ -183,6 +183,17 @@ gimp_config_deserialize_properties (GObject *object,
g_scanner_set_scope (scanner, old_scope_id);
/* If store_unknown_tokens is TRUE but the unknown token value couldn't
be parsed the default error message is rather confusing.
We try to produce something more meaningful here ... */
if ((store_unknown_tokens &&
token == G_TOKEN_STRING && next == G_TOKEN_IDENTIFIER))
{
g_scanner_unexp_token (scanner, G_TOKEN_SYMBOL, NULL, NULL, NULL,
_("fatal parse error"), TRUE);
return FALSE;
}
return gimp_config_deserialize_return (scanner, token, nest_level);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment