[evolution-ews] Extend error messages in camel_ews_folder_get_message()



commit ec7ddcfb1844410ebdab6a68330d7ef35524d295
Author: Milan Crha <mcrha redhat com>
Date:   Tue Oct 20 09:05:46 2015 +0200

    Extend error messages in camel_ews_folder_get_message()
    
    Report also used paths and the failure message in the error message.

 src/camel/camel-ews-folder.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index ce14f6a..5a60c8b 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -554,7 +554,8 @@ camel_ews_folder_get_message (CamelFolder *folder,
            g_mkdir_with_parents (mime_dir, 0700) == -1) {
                g_set_error (
                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-                       _("Unable to create cache path"));
+                       _("Unable to create cache path '%s': %s"),
+                       mime_dir, g_strerror (errno));
                g_free (mime_dir);
                goto exit;
        }
@@ -645,7 +646,8 @@ camel_ews_folder_get_message (CamelFolder *folder,
        if (g_mkdir_with_parents (dir, 0700) == -1) {
                g_set_error (
                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-                       _("Unable to create cache path"));
+                       _("Unable to create cache path '%s': %s"),
+                       dir, g_strerror (errno));
                g_free (dir);
                g_free (cache_file);
                goto exit;
@@ -655,7 +657,11 @@ camel_ews_folder_get_message (CamelFolder *folder,
        if (g_rename (mime_content, cache_file) != 0) {
                g_set_error (
                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-                       _("Failed to move message cache file"));
+                       /* Translators: The first %s consists of the source file name,
+                          the second %s of the destination file name and
+                          the third %s of the error message. */
+                       _("Failed to move message cache file from '%s' to '%s': %s"),
+                       mime_content, cache_file, g_strerror (errno));
                g_free (cache_file);
                goto exit;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]