[evolution-data-server/openismus-work] 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/openismus-work] EBookBackendSqliteDB: Added contact-not-found error type.
- Date: Mon, 21 Jan 2013 10:45:12 +0000 (UTC)
commit 1e33f6521c5eec8a4fc839484fad029b123a04d8
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 1db37a9..960393a 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -2336,10 +2336,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 71f15bc..1be7ce7 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]