[tracker-miners/wip/carlosg/issue-tracker-42] libtracker-miners-common: Make g_error() a soft error
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/issue-tracker-42] libtracker-miners-common: Make g_error() a soft error
- Date: Thu, 8 Nov 2018 14:32:27 +0000 (UTC)
commit 3b6a331691d1059807eebcfec5636a4d12d53ddb
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Nov 8 15:27:08 2018 +0100
libtracker-miners-common: Make g_error() a soft error
Make TrackerDomainOntology initialization fail if the .rule file
is not found, instead of a fatal error.
Closes: https://gitlab.gnome.org/GNOME/tracker/issues/42
src/libtracker-miners-common/tracker-domain-ontology.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-miners-common/tracker-domain-ontology.c
b/src/libtracker-miners-common/tracker-domain-ontology.c
index d613c5ed6..9c80b30b7 100644
--- a/src/libtracker-miners-common/tracker-domain-ontology.c
+++ b/src/libtracker-miners-common/tracker-domain-ontology.c
@@ -332,7 +332,11 @@ tracker_domain_ontology_initable_init (GInitable *initable,
path_for_tests = g_strdup (g_getenv ("TRACKER_TEST_DOMAIN_ONTOLOGY_RULE"));
if (path_for_tests == NULL) {
- g_error ("Unable to find default domain ontology rule %s", path);
+ inner_error = g_error_new (G_KEY_FILE_ERROR,
+ G_KEY_FILE_ERROR_NOT_FOUND,
+ "Unable to find default domain ontology rule %s",
+ path);
+ goto end;
}
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]