diff options
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/local/camel-maildir-folder.c | 16 | ||||
-rw-r--r-- | camel/providers/local/camel-mbox-folder.c | 11 | ||||
-rw-r--r-- | camel/providers/local/camel-mh-folder.c | 16 | ||||
-rw-r--r-- | camel/providers/pop3/camel-pop3-folder.c | 2 |
4 files changed, 25 insertions, 20 deletions
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c index eca07efbef..3caa91d771 100644 --- a/camel/providers/local/camel-maildir-folder.c +++ b/camel/providers/local/camel-maildir-folder.c @@ -208,7 +208,9 @@ static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar * /* get the message summary info */ if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) { - camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"), uid, _("No such message")); + camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, + _("Cannot get message: %s from folder %s\n %s"), + uid, lf->folder_path, _("No such message")); return NULL; } @@ -220,18 +222,18 @@ static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar * camel_folder_summary_info_free(folder->summary, info); if ((message_stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0)) == NULL) { - camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, - _("Cannot get message: %s\n %s"), - name, g_strerror (errno)); + camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot get message: %s from folder %s\n %s"), + uid, lf->folder_path, g_strerror(errno)); g_free(name); return NULL; } message = camel_mime_message_new(); if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream) == -1) { - camel_exception_setv(ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_FOLDER_INVALID_UID, - _("Cannot get message: %s\n %s"), - name, _("Invalid message contents")); + camel_exception_setv(ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM, + _("Cannot get message: %s from folder %s\n %s"), + uid, lf->folder_path, _("Invalid message contents")); g_free(name); camel_object_unref((CamelObject *)message_stream); camel_object_unref((CamelObject *)message); diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c index eeeb974a52..0d86b6d766 100644 --- a/camel/providers/local/camel-mbox-folder.c +++ b/camel/providers/local/camel-mbox-folder.c @@ -414,7 +414,8 @@ retry: if (info == NULL) { camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, - _("Cannot get message: %s\n %s"), uid, _("No such message")); + _("Cannot get message: %s from folder %s\n %s"), + uid, lf->folder_path, _("No such message")); goto fail; } @@ -431,7 +432,7 @@ retry: fd = open(lf->folder_path, O_RDONLY); if (fd == -1) { - camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, + camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path, g_strerror (errno)); goto fail; @@ -462,7 +463,7 @@ retry: goto retry; } - camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, + camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID, _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path, _("The folder appears to be irrecoverably corrupted.")); goto fail; @@ -470,9 +471,9 @@ retry: message = camel_mime_message_new(); if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) { - camel_exception_setv(ex, errno==EINTR?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_FOLDER_INVALID_UID, + camel_exception_setv(ex, errno==EINTR?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM, _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path, - _("Message construction failed: Corrupt mailbox?")); + _("Message construction failed.")); camel_object_unref((CamelObject *)message); message = NULL; goto fail; diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c index 25dbacc49a..83a11e24e2 100644 --- a/camel/providers/local/camel-mh-folder.c +++ b/camel/providers/local/camel-mh-folder.c @@ -197,7 +197,9 @@ static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid, /* get the message summary info */ if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) { - camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"), uid, _("No such message")); + camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, + _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path, + _("No such message")); return NULL; } @@ -206,18 +208,18 @@ static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid, name = g_strdup_printf("%s/%s", lf->folder_path, uid); if ((message_stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0)) == NULL) { - camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, - _("Cannot get message: %s\n %s"), - name, g_strerror (errno)); + camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot get message: %s from folder %s\n %s"), name, lf->folder_path, + g_strerror (errno)); g_free(name); return NULL; } message = camel_mime_message_new(); if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream) == -1) { - camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, - _("Cannot get message: %s\n %s"), - name, _("Invalid message contents")); + camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot get message: %s from folder %s\n %s"), name, lf->folder_path, + _("Message construction failed.")); g_free(name); camel_object_unref((CamelObject *)message_stream); camel_object_unref((CamelObject *)message); diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c index edb71802bc..1c17079006 100644 --- a/camel/providers/pop3/camel-pop3-folder.c +++ b/camel/providers/pop3/camel-pop3-folder.c @@ -497,7 +497,7 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex) } if (camel_stream_read(stream, buffer, 1) != 1 || buffer[0] != '#') { - camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, + camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, _("Unknown reason")); goto done; } |