[tracker/journal] libtracker-data: Deal with future error codes correctly without surprises
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal] libtracker-data: Deal with future error codes correctly without surprises
- Date: Wed, 20 Oct 2010 14:29:08 +0000 (UTC)
commit 7111080358d43c8981361bcc95964d43a79e2fbc
Author: Philip Van Hoof <philip codeminded be>
Date: Wed Oct 20 16:28:40 2010 +0200
libtracker-data: Deal with future error codes correctly without surprises
src/libtracker-data/tracker-data-manager.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index cb92a45..4ed7358 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3403,7 +3403,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
uri_id_map,
&ontology_error);
- if (ontology_error) {
+ if (ontology_error && ontology_error->code == TRACKER_DATA_UNSUPPORTED_ONTOLOGY_CHANGE) {
g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
@@ -3436,6 +3436,11 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
busy_status);
}
+ if (ontology_error) {
+ g_critical ("Fatal error dealing with ontology changes: %s", ontology_error->message);
+ g_error_free (ontology_error);
+ }
+
to_reload = g_list_prepend (to_reload, l->data);
update_nao = TRUE;
}
@@ -3457,7 +3462,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
uri_id_map,
&ontology_error);
- if (ontology_error) {
+ if (ontology_error && ontology_error->code == TRACKER_DATA_UNSUPPORTED_ONTOLOGY_CHANGE) {
g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
@@ -3490,6 +3495,11 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
busy_status);
}
+ if (ontology_error) {
+ g_critical ("Fatal error dealing with ontology changes: %s", ontology_error->message);
+ g_error_free (ontology_error);
+ }
+
to_reload = g_list_prepend (to_reload, l->data);
update_nao = TRUE;
}
@@ -3531,7 +3541,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
seen_properties,
&ontology_error);
- if (ontology_error) {
+ if (ontology_error && ontology_error->code == TRACKER_DATA_UNSUPPORTED_ONTOLOGY_CHANGE) {
g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
@@ -3564,6 +3574,11 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
busy_status);
}
+ if (ontology_error) {
+ g_critical ("Fatal error dealing with ontology changes: %s", ontology_error->message);
+ g_error_free (ontology_error);
+ }
+
for (l = to_reload; l; l = l->next) {
const gchar *ontology_path = l->data;
/* store ontology in database */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]