Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1650/src/mail
Modified Files:
SendMessageCC.cpp
Log Message:
give more clear error messages: explanation from LogCircle (if any) is now immediately
shown to the user
Index: SendMessageCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/SendMessageCC.cpp,v
retrieving revision 1.228
retrieving revision 1.229
diff -b -u -2 -r1.228 -r1.229
--- SendMessageCC.cpp 12 May 2004 08:46:25 -0000 1.228
+++ SendMessageCC.cpp 19 Sep 2004 15:43:43 -0000 1.229
@@ -2010,52 +2010,39 @@
_T("MailSentMessage"));
}
+
+ return true;
}
- else // failed to send/post
- {
+ //else: failed to send/post
+ }
+ //else: error in opening stream
+
MLogCircle& log = MailFolder::GetLogCircle();
if ( !reply.empty() )
{
log.Add(reply);
- }
- const String explanation = log.GuessError();
+ // always show the server reply but do it first so it's not the top most
+ // message show
+ ERRORMESSAGE((_T("%s"), reply.c_str()));
+ }
// give the general error message anyhow
- String err = m_Protocol == Prot_SMTP ? _("Failed to send the message.")
- : _("Failed to post the article.");
+ String err = m_Protocol == Prot_SMTP ? _("Failed to send the message")
+ : _("Failed to post the article");
// and then try to give more details about what happened
- if ( !explanation.empty() )
- {
- err << _T("\n\n") << explanation;
- }
- else if ( !reply.empty() )
+ const String explanation = log.GuessError();
+ if ( explanation.empty() )
{
- // no explanation, at least show the server error message
- err << _T("\n\n") << _("Server error: ") << reply;
- }
-
- ERRORMESSAGE((_T("%s"), err.c_str()));
- }
+ err += _T(".");
}
- else // error in opening stream
+ else // have explanation
{
- String err;
- err.Printf(_("Cannot open connection to the %s server '%s'."),
- m_Protocol == Prot_SMTP ? "SMTP" : "NNTP",
- m_ServerHost.c_str());
-
- String explanation = MailFolder::GetLogCircle().GuessError();
- if ( !explanation.empty() )
- {
- err << _T("\n\n") << explanation;
+ err += _T(":\n\n") + explanation;
}
ERRORMESSAGE((_T("%s"), err.c_str()));
- success = false;
- }
-
- return success;
+ return false;
}
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates