aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-local.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-05 05:40:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-09 02:37:52 +0800
commit137b0743ddfbd3bbc01c9813615ede91ddd9b954 (patch)
tree1d8e09ba0239eff419d432bdd8d5b521fbb727ba /mail/e-mail-local.c
parent36f1f29b9a42c56a619e031b045db5a18f2b1dd7 (diff)
downloadgsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.gz
gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.zst
gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.zip
Migrate from CamelException to GError.
Diffstat (limited to 'mail/e-mail-local.c')
-rw-r--r--mail/e-mail-local.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/mail/e-mail-local.c b/mail/e-mail-local.c
index 002865cd33..7b825c4240 100644
--- a/mail/e-mail-local.c
+++ b/mail/e-mail-local.c
@@ -48,17 +48,15 @@ void
e_mail_local_init (const gchar *data_dir)
{
static gboolean initialized = FALSE;
- CamelException ex;
CamelService *service;
CamelURL *url;
gchar *temp;
gint ii;
+ GError *local_error = NULL;
g_return_if_fail (!initialized);
g_return_if_fail (data_dir != NULL);
- camel_exception_init (&ex);
-
url = camel_url_new ("mbox:", NULL);
temp = g_build_filename (data_dir, "local", NULL);
camel_url_set_path (url, temp);
@@ -66,10 +64,10 @@ e_mail_local_init (const gchar *data_dir)
temp = camel_url_to_string (url, 0);
service = camel_session_get_service (
- session, temp, CAMEL_PROVIDER_STORE, &ex);
+ session, temp, CAMEL_PROVIDER_STORE, &local_error);
g_free (temp);
- if (camel_exception_is_set (&ex))
+ if (local_error != NULL)
goto fail;
/* Populate the rest of the default_local_folders array. */
@@ -86,9 +84,7 @@ e_mail_local_init (const gchar *data_dir)
default_local_folders[ii].folder_uri = folder_uri;
default_local_folders[ii].folder = camel_store_get_folder (
CAMEL_STORE (service), display_name,
- CAMEL_STORE_FOLDER_CREATE, &ex);
-
- camel_exception_clear (&ex);
+ CAMEL_STORE_FOLDER_CREATE, NULL);
}
camel_url_free (url);
@@ -99,9 +95,11 @@ e_mail_local_init (const gchar *data_dir)
return;
fail:
- g_warning ("Could not initialize local store/folder: %s", ex.desc);
+ g_warning (
+ "Could not initialize local store/folder: %s",
+ local_error->message);
- camel_exception_clear (&ex);
+ g_error_free (local_error);
camel_url_free (url);
}