[evolution-data-server] EBookBackendFile: Reduce uneeded warnings in server logs
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] EBookBackendFile: Reduce uneeded warnings in server logs
- Date: Thu, 14 Nov 2013 09:51:41 +0000 (UTC)
commit 90683f463ea4ee2f95d70e0f10ac65bf4e8a7aa1
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Thu Nov 14 17:40:59 2013 +0900
EBookBackendFile: Reduce uneeded warnings in server logs
With this patch, only unknown errors, which the user is not expected
to handle or recover from (such as internal SQLite errors or file system
errors), are warned about in the stderr.
addressbook/backends/file/e-book-backend-file.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 4f4a547..b166e6d 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -836,8 +836,6 @@ do_create (EBookBackendFile *bf,
slist, FALSE,
&local_error)) {
- g_warning ("Failed to add contacts: %s", local_error->message);
-
if (g_error_matches (local_error,
E_BOOK_SDB_ERROR,
E_BOOK_SDB_ERROR_CONSTRAINT)) {
@@ -846,8 +844,10 @@ do_create (EBookBackendFile *bf,
E_BOOK_CLIENT_ERROR_CONTACT_ID_ALREADY_EXISTS,
_("Conflicting UIDs found in added contacts"));
g_clear_error (&local_error);
- } else
+ } else {
+ g_warning ("Failed to add contacts: %s", local_error->message);
g_propagate_error (error, local_error);
+ }
status = STATUS_ERROR;
}
@@ -1439,7 +1439,6 @@ book_backend_file_remove_contacts_sync (EBookBackend *backend,
removed_ids = g_slist_prepend (removed_ids, g_strdup (uids[ii]));
removed_contacts = g_slist_prepend (removed_contacts, contact);
} else {
- g_warning ("Failed to fetch contact to be removed: %s", local_error->message);
if (g_error_matches (local_error,
E_BOOK_SDB_ERROR,
@@ -1450,6 +1449,7 @@ book_backend_file_remove_contacts_sync (EBookBackend *backend,
_("Contact '%s' not found"), uids[ii]);
g_error_free (local_error);
} else {
+ g_warning ("Failed to fetch contact to be removed: %s", local_error->message);
g_propagate_error (error, local_error);
local_error = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]