From c5eb6afc0f79bf16fcb5f4bd119b82ac7a188184 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 10 Dec 2012 14:50:18 +0100 Subject: Bug #579315 - Identify filter names in filtering errors --- libemail-engine/mail-ops.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'libemail-engine') diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c index bd4b4f9676..e2bcaa6894 100644 --- a/libemail-engine/mail-ops.c +++ b/libemail-engine/mail-ops.c @@ -747,9 +747,18 @@ mail_send_message (struct _send_queue_msg *m, goto exit; /* sending mail, filtering failed */ - g_string_append_printf ( - err, _("Failed to apply outgoing filters: %s"), - local_error->message); + if (g_error_matches (local_error, CAMEL_SERVICE_ERROR, CAMEL_SERVICE_ERROR_URL_INVALID) || + g_error_matches (local_error, CAMEL_FOLDER_ERROR, CAMEL_FOLDER_ERROR_INVALID)) { + g_string_append_printf (err, + _("Failed to apply outgoing filters. One reason can be that folder " + "location set in one or more filters is invalid. Please check your " + "filters in Edit->Message Filters.\n" + "Original error was: %s"), local_error->message); + } else { + g_string_append_printf ( + err, _("Failed to apply outgoing filters: %s"), + local_error->message); + } g_clear_error (&local_error); } -- cgit v1.2.3