[evolution-data-server] EBookBackendSqliteDB: Added contact-not-found error type.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] EBookBackendSqliteDB: Added contact-not-found error type.
- Date: Wed, 23 Jan 2013 04:38:33 +0000 (UTC)
commit 2ec4c362771c0f44fcd9405876d4623f1a9bb9e3
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Mon Jan 21 17:50:55 2013 +0900
EBookBackendSqliteDB: Added contact-not-found error type.
Report this error if a contact was requested by UID and not found.
.../libedata-book/e-book-backend-sqlitedb.c | 3 +--
.../libedata-book/e-book-backend-sqlitedb.h | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index 5df68c3..1382de6 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -2130,10 +2130,9 @@ e_book_backend_sqlitedb_get_vcard_string (EBookBackendSqliteDB *ebsdb,
if (with_all_required_fields)
*with_all_required_fields = local_with_all_required_fields;
- /* Is is an error to not find a contact ?? */
if (!vcard_str && error && !*error)
g_set_error (
- error, E_BOOK_SDB_ERROR, E_BOOK_SDB_ERROR_OTHER,
+ error, E_BOOK_SDB_ERROR, E_BOOK_SDB_ERROR_CONTACT_NOT_FOUND,
_("Contact '%s' not found"), uid ? uid : "NULL");
return vcard_str;
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.h b/addressbook/libedata-book/e-book-backend-sqlitedb.h
index c5621af..cfc33e6 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.h
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.h
@@ -65,12 +65,15 @@ typedef struct _EBookBackendSqliteDBPrivate EBookBackendSqliteDBPrivate;
/**
* EBookSDBError:
* @E_BOOK_SDB_ERROR_CONSTRAINT: The error occurred due to an explicit constraint
+ * @E_BOOK_SDB_ERROR_CONTACT_NOT_FOUND: A contact was not found by UID (this is different
+ * from a query that returns no results, which is not an error).
* @E_BOOK_SDB_ERROR_OTHER: Another error occurred
*
* Defines the types of possible errors reported by the #EBookBackendSqliteDB
*/
typedef enum {
E_BOOK_SDB_ERROR_CONSTRAINT,
+ E_BOOK_SDB_ERROR_CONTACT_NOT_FOUND,
E_BOOK_SDB_ERROR_OTHER
} EBookSDBError;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]