aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
committerMilan Crha <mcrha@redhat.com>2010-07-09 20:29:51 +0800
commit03d626856b294bc98919ac244e04e9b8821a681d (patch)
tree62433e158f1791aa6b9222ecbe05d164c4703f6c /mail
parent6d4ce8571ff62a3e489999d2feeac1691e06c59a (diff)
downloadgsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.gz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.bz2
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.lz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.xz
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.tar.zst
gsoc2013-evolution-03d626856b294bc98919ac244e04e9b8821a681d.zip
Bug #623204 - Be able to report detailed errors from backends
Diffstat (limited to 'mail')
-rw-r--r--mail/em-utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index aa147bf7e1..e182e61364 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1565,18 +1565,18 @@ struct TryOpenEBookStruct {
};
static void
-try_open_e_book_cb (EBook *book, EBookStatus status, gpointer closure)
+try_open_e_book_cb (EBook *book, const GError *error, gpointer closure)
{
struct TryOpenEBookStruct *data = (struct TryOpenEBookStruct *)closure;
if (!data)
return;
- data->result = status == E_BOOK_ERROR_OK;
+ data->result = error == NULL;
if (!data->result) {
g_clear_error (data->error);
- g_set_error (data->error, E_BOOK_ERROR, status, "EBookStatus returned %d", status);
+ g_propagate_error (data->error, g_error_copy (error));
}
e_flag_set (data->flag);
@@ -1600,10 +1600,10 @@ try_open_e_book (EBook *book, gboolean only_if_exists, GError **error)
data.flag = flag;
data.result = FALSE;
- if (e_book_async_open (book, only_if_exists, try_open_e_book_cb, &data) != FALSE) {
+ if (!e_book_async_open_ex (book, only_if_exists, try_open_e_book_cb, &data)) {
e_flag_free (flag);
g_clear_error (error);
- g_set_error (error, E_BOOK_ERROR, E_BOOK_ERROR_OTHER_ERROR, "Failed to call e_book_async_open.");
+ g_set_error (error, E_BOOK_ERROR, E_BOOK_ERROR_OTHER_ERROR, "Failed to call e_book_async_open_ex.");
return FALSE;
}