[evolution-data-server] EBookBackendFile: Properly translate E_BOOK_SDB_ERROR_QUERY_INVALID errors
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] EBookBackendFile: Properly translate E_BOOK_SDB_ERROR_QUERY_INVALID errors
- Date: Wed, 27 Feb 2013 15:35:39 +0000 (UTC)
commit dbe825c5a1ad76b6b5577bde804e15cc921e1f29
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Wed Feb 27 20:08:45 2013 +0900
EBookBackendFile: Properly translate E_BOOK_SDB_ERROR_QUERY_INVALID errors
addressbook/backends/file/e-book-backend-file.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 53ac1be..4b530f3 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1084,6 +1084,15 @@ e_book_backend_file_get_contact_list (EBookBackendSync *backend,
E_DATA_BOOK_STATUS_NOT_SUPPORTED,
_("Query '%s' not supported"), query);
g_error_free (local_error);
+
+ } else if (g_error_matches (local_error,
+ E_BOOK_SDB_ERROR,
+ E_BOOK_SDB_ERROR_INVALID_QUERY)) {
+ g_set_error (perror, E_DATA_BOOK_ERROR,
+ E_DATA_BOOK_STATUS_INVALID_QUERY,
+ _("Invalid Query '%s'"), query);
+ g_error_free (local_error);
+
} else {
g_warning ("Failed to fetch contact ids: %s", local_error->message);
g_propagate_error (perror, local_error);
@@ -1123,6 +1132,15 @@ e_book_backend_file_get_contact_list_uids (EBookBackendSync *backend,
E_DATA_BOOK_STATUS_NOT_SUPPORTED,
_("Query '%s' not supported"), query);
g_error_free (local_error);
+
+ } else if (g_error_matches (local_error,
+ E_BOOK_SDB_ERROR,
+ E_BOOK_SDB_ERROR_INVALID_QUERY)) {
+ g_set_error (perror, E_DATA_BOOK_ERROR,
+ E_DATA_BOOK_STATUS_INVALID_QUERY,
+ _("Invalid Query '%s'"), query);
+ g_error_free (local_error);
+
} else {
g_warning ("Failed to fetch contact ids: %s", local_error->message);
g_propagate_error (perror, local_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]