From 137b0743ddfbd3bbc01c9813615ede91ddd9b954 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Jul 2010 17:40:28 -0400 Subject: Migrate from CamelException to GError. --- mail/e-mail-local.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'mail/e-mail-local.c') 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); } -- cgit v1.2.3