Bug 1151181 - properly initialize error string in mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp::OnStopRunningUrl for all error codes. r=Neil, a=rkent
authoraceman <acelists@atlas.sk>
Tue, 14 Apr 2015 22:41:21 +0200
changeset 25845 662ccf7959bc45723bbeb9c78c3823624f218c53
parent 25844 44a5a8e051cb427cd228b85a79951a405efd7661
child 25846 9d0181083ebb5cc609d04d72acf5d81817b6e2c2
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil, rkent
bugs1151181
Bug 1151181 - properly initialize error string in mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp::OnStopRunningUrl for all error codes. r=Neil, a=rkent
mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
@@ -1084,30 +1084,27 @@ NS_IMETHODIMP nsMsgMdnGenerator::OnStopR
       case NS_ERROR_UNKNOWN_PROXY_HOST:
         exitString = MOZ_UTF16("smtpSendFailedUnknownServer");
         break;
       case NS_ERROR_CONNECTION_REFUSED:
       case NS_ERROR_PROXY_CONNECTION_REFUSED:
         exitString = MOZ_UTF16("smtpSendRefused");
         break;
       case NS_ERROR_NET_INTERRUPT:
+      case NS_ERROR_ABORT: // we have no proper string for error code NS_ERROR_ABORT in compose bundle
         exitString = MOZ_UTF16("smtpSendInterrupted");
         break;
       case NS_ERROR_NET_TIMEOUT:
       case NS_ERROR_NET_RESET:
         exitString = MOZ_UTF16("smtpSendTimeout");
         break;
-      case NS_ERROR_SMTP_PASSWORD_UNDEFINED:
-        exitString = MOZ_UTF16("smtpPasswordUndefined");
+      default:
+        exitString = errorStringNameForErrorCode(aExitCode);
         break;
-      default:
-        if (aExitCode != NS_ERROR_ABORT && !NS_IS_MSG_ERROR(aExitCode))
-          exitString = MOZ_UTF16("smtpSendFailedUnknownReason");
-      break;
-    }
+-   }
 
     nsCOMPtr<nsISmtpService> smtpService(do_GetService(NS_SMTPSERVICE_CONTRACTID, &rv));
     NS_ENSURE_SUCCESS(rv,rv);
 
     // Get the smtp hostname and format the string.
     nsCString smtpHostName;
     nsCOMPtr<nsISmtpServer> smtpServer;
     rv = smtpService->GetServerByIdentity(m_identity, getter_AddRefs(smtpServer));