[gimp] app: fix error reporting in gimp_tool_preset_deserialize_property()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix error reporting in gimp_tool_preset_deserialize_property()
- Date: Tue, 27 Mar 2018 23:20:22 +0000 (UTC)
commit 60e01f5593ebf2ba9bef52ec1322fad4b6531a6c
Author: Michael Natterer <mitch gimp org>
Date: Wed Mar 28 01:17:39 2018 +0200
app: fix error reporting in gimp_tool_preset_deserialize_property()
when setting a custom parse error with g_scanner_error() we *must*
return G_TOKEN_NONE as expected token, or general GimpConfig error
handling will try to overwrite our error with its generic "unexpected
token" message, which triggers a warning.
app/core/gimptoolpreset.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/core/gimptoolpreset.c b/app/core/gimptoolpreset.c
index b99c7a2..0a1a584 100644
--- a/app/core/gimptoolpreset.c
+++ b/app/core/gimptoolpreset.c
@@ -397,7 +397,7 @@ gimp_tool_preset_deserialize_property (GimpConfig *config,
g_scanner_error (scanner,
"unable to determine type of '%s'",
type_name);
- *expected = G_TOKEN_STRING;
+ *expected = G_TOKEN_NONE;
g_free (type_name);
break;
}
@@ -407,7 +407,7 @@ gimp_tool_preset_deserialize_property (GimpConfig *config,
g_scanner_error (scanner,
"'%s' is not a subclass of GimpToolOptions",
type_name);
- *expected = G_TOKEN_STRING;
+ *expected = G_TOKEN_NONE;
g_free (type_name);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]