[evolution-data-server] Propagate SELECT error properly to dependent commands



commit b57a6af1724e1447e35e2003a14bf74891182873
Author: David Woodhouse <David Woodhouse intel com>
Date:   Wed Jun 30 09:44:25 2010 +0100

    Propagate SELECT error properly to dependent commands

 camel/providers/imapx/camel-imapx-server.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index e609313..b8729f6 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2276,7 +2276,13 @@ imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 			while (cn) {
 				if (ic->status)
 					cw->status = imapx_copy_status(ic->status);
-				camel_exception_setv (cw->ex, 1, "select %s failed", cw->select);
+				if (camel_exception_is_set(ic->ex))
+					camel_exception_xfer (cw->ex, ic->ex);
+				else {
+					camel_exception_setv (cw->ex, 1, "SELECT %s failed: %s",
+							      camel_folder_get_full_name(cw->select),
+							      ic->status->text?:"<unknown reason>");
+				}
 				cw->complete(is, cw);
 				cw = cn;
 				cn = cn->next;



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