[tracker/error-handling] libtracker-data: Move g_warning into else-clause to avoid warn and then propagate



commit fdbb92e8cfa6d8efcb70a20622ad5a0573df3ab9
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Feb 9 17:29:27 2011 +0100

    libtracker-data: Move g_warning into else-clause to avoid warn and then propagate

 src/libtracker-data/tracker-data-update.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index dc164dc..9674cc5 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2737,15 +2737,14 @@ tracker_data_replay_journal (TrackerBusyCallback   busy_callback,
 
 			tracker_data_commit_transaction (&new_error);
 			if (new_error) {
-				g_warning ("Journal replay error: '%s'", new_error->message);
-
 				/* Out of disk is an unrecoverable fatal error */
 				if (g_error_matches (new_error, TRACKER_DB_INTERFACE_ERROR, TRACKER_DB_NO_SPACE)) {
 					g_propagate_error (error, new_error);
 					return;
+				} else {
+					g_warning ("Journal replay error: '%s'", new_error->message);
+					g_clear_error (&new_error);
 				}
-
-				g_clear_error (&new_error);
 			}
 		} else if (type == TRACKER_DB_JOURNAL_INSERT_STATEMENT) {
 			GError *new_error = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]