# HG changeset patch # User Jorg K # Date 1540227192 -7200 # Node ID 70c2176c3b1322967407ed66b46c5ae129427a1e # Parent 87c0b61ffb3b734c395df4595493530c14a34b9c Bug 1497488 - Follow-up: Remove unused error codes. r=mkmelin diff --git a/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties b/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties --- a/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties +++ b/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties @@ -37,18 +37,16 @@ smtpSecurityIssue=The configuration rela ## LOCALIZATION NOTE (smtpServerError): argument %s is the Outgoing server (SMTP) response smtpServerError=An error occurred while sending mail: Outgoing server (SMTP) error. The server responded: %s. unableToSendLater=Sorry, we were unable to save your message for sending later. ## LOCALIZATION NOTE (communicationsError): argument %d is the error code communicationsError=A communications error occurred: %d. Please try again. dontShowAlert=THIS IS JUST A PLACEHOLDER. YOU SHOULD NEVER SEE THIS STRING. -## LOCALIZATION NOTE (tcpReadError): argument %s is the network error -tcpReadError=A network error occurred while receiving data. (Network Error: %s) Try connecting again. couldNotGetUsersMailAddress2=An error occurred while sending mail: the sender's address (From:) was invalid. Please verify that this email address is correct and try again. couldNotGetSendersIdentity=An error occurred while sending mail: the sender identity was invalid. Please verify the configuration of your identity and try again. mimeMpartAttachmentError=Attachment error. failedCopyOperation=The message was sent successfully, but could not be copied to your Sent folder. nntpNoCrossPosting=You can only send a message to one news server at a time. msgCancelling=Cancelling… sendFailedButNntpOk=Your message has been posted to the newsgroup but has not been sent to the other recipient. @@ -107,19 +105,16 @@ smtpHintAuthPlainToEncrypt=The Outgoing smtpAuthFailure=Unable to authenticate to Outgoing server (SMTP) %S. Please check the password and verify the 'Authentication method' in 'Account Settings | Outgoing server (SMTP)'. # LOCALIZATION NOTE (smtpAuthGssapi): %S is the server hostname smtpAuthGssapi=The Kerberos/GSSAPI ticket was not accepted by the Outgoing server (SMTP) %S. Please check that you are logged in to the Kerberos/GSSAPI realm. # LOCALIZATION NOTE (smtpAuthMechNotSupported): %S is the server hostname smtpAuthMechNotSupported=The Outgoing server (SMTP) %S does not support the selected authentication method. Please change the 'Authentication method' in 'Account Settings | Outgoing Server (SMTP)'. -# LOCALIZATION NOTE (smtpAuthenticationNotSupported): %S is the server hostname -smtpAuthenticationNotSupported=Unable to authenticate to Outgoing server (SMTP) %S. It does not support authentication (SMTP-AUTH) but you have chosen to use authentication. Please change the 'Authentication method' to 'None' in the 'Account Settings | Outgoing Server (SMTP)' or contact your email service provider for instructions. - # LOCALIZATION NOTE (errorIllegalLocalPart): %s is an email address with an illegal localpart errorIllegalLocalPart=There are non-ASCII characters in the local part of the recipient address %s. This is not yet supported. Please change this address and try again. ## Strings used for the save message dialog shown when the user closes a message compose window saveDlogTitle=Save Message ## LOCALIZATION NOTE (saveDlogMessages3): Do not translate the words %1$S and \n. ## %1$S is replaced by the folder name configured for saving drafts (typically the "Drafts" folder). diff --git a/mailnews/compose/src/nsComposeStrings.cpp b/mailnews/compose/src/nsComposeStrings.cpp --- a/mailnews/compose/src/nsComposeStrings.cpp +++ b/mailnews/compose/src/nsComposeStrings.cpp @@ -32,42 +32,32 @@ const char* errorStringNameForErrorCode( case NS_ERROR_SENDING_FROM_COMMAND: return "errorSendingFromCommand"; case NS_ERROR_SENDING_DATA_COMMAND: return "errorSendingDataCommand"; case NS_ERROR_SENDING_MESSAGE: return "errorSendingMessage"; case NS_ERROR_POST_FAILED: return "postFailed"; - case NS_ERROR_QUEUED_DELIVERY_FAILED: - return "errorQueuedDeliveryFailed"; case NS_ERROR_SMTP_SERVER_ERROR: return "smtpServerError"; case NS_MSG_UNABLE_TO_SEND_LATER: return "unableToSendLater"; case NS_ERROR_COMMUNICATIONS_ERROR: return "communicationsError"; case NS_ERROR_BUT_DONT_SHOW_ALERT: return "dontShowAlert"; - case NS_ERROR_TCP_READ_ERROR: - return "tcpReadError"; case NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS: return "couldNotGetUsersMailAddress2"; case NS_ERROR_COULD_NOT_GET_SENDERS_IDENTITY: return "couldNotGetSendersIdentity"; case NS_ERROR_MIME_MPART_ATTACHMENT_ERROR: return "mimeMpartAttachmentError"; - case NS_MSG_FAILED_COPY_OPERATION: - return "failedCopyOperation"; case NS_ERROR_NNTP_NO_CROSS_POSTING: return "nntpNoCrossPosting"; - case NS_MSG_CANCELLING: - return "msgCancelling"; - case NS_ERROR_SEND_FAILED_BUT_NNTP_OK: - return "sendFailedButNntpOk"; case NS_MSG_ERROR_READING_FILE: return "errorReadingFile"; case NS_MSG_ERROR_ATTACHING_FILE: return "errorAttachingFile"; case NS_ERROR_SMTP_GREETING: return "incorrectSmtpGreeting"; case NS_ERROR_SENDING_RCPT_COMMAND: return "errorSendingRcptCommand"; @@ -98,18 +88,16 @@ const char* errorStringNameForErrorCode( case NS_ERROR_SMTP_AUTH_CHANGE_PLAIN_TO_ENCRYPT: return "smtpHintAuthPlainToEncrypt"; case NS_ERROR_SMTP_AUTH_FAILURE: return "smtpAuthFailure"; case NS_ERROR_SMTP_AUTH_GSSAPI: return "smtpAuthGssapi"; case NS_ERROR_SMTP_AUTH_MECH_NOT_SUPPORTED: return "smtpAuthMechNotSupported"; - case NS_ERROR_SMTP_AUTH_NOT_SUPPORTED: - return "smtpAuthenticationNotSupported"; case NS_ERROR_ILLEGAL_LOCALPART: return "errorIllegalLocalPart"; default: return "sendFailed"; } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif diff --git a/mailnews/compose/src/nsComposeStrings.h b/mailnews/compose/src/nsComposeStrings.h --- a/mailnews/compose/src/nsComposeStrings.h +++ b/mailnews/compose/src/nsComposeStrings.h @@ -19,33 +19,27 @@ #define NS_MSG_COULDNT_OPEN_FCC_FOLDER NS_MSG_GENERATE_FAILURE(12506) #define NS_MSG_NO_SENDER NS_MSG_GENERATE_FAILURE(12510) #define NS_MSG_NO_RECIPIENTS NS_MSG_GENERATE_FAILURE(12511) #define NS_MSG_ERROR_WRITING_FILE NS_MSG_GENERATE_FAILURE(12512) #define NS_ERROR_SENDING_FROM_COMMAND NS_MSG_GENERATE_FAILURE(12514) #define NS_ERROR_SENDING_DATA_COMMAND NS_MSG_GENERATE_FAILURE(12516) #define NS_ERROR_SENDING_MESSAGE NS_MSG_GENERATE_FAILURE(12517) #define NS_ERROR_POST_FAILED NS_MSG_GENERATE_FAILURE(12518) -#define NS_ERROR_QUEUED_DELIVERY_FAILED NS_MSG_GENERATE_FAILURE(12519) #define NS_ERROR_SMTP_SERVER_ERROR NS_MSG_GENERATE_FAILURE(12524) #define NS_MSG_UNABLE_TO_SEND_LATER NS_MSG_GENERATE_FAILURE(12525) #define NS_ERROR_COMMUNICATIONS_ERROR NS_MSG_GENERATE_FAILURE(12526) #define NS_ERROR_BUT_DONT_SHOW_ALERT NS_MSG_GENERATE_FAILURE(12527) -#define NS_ERROR_TCP_READ_ERROR NS_MSG_GENERATE_FAILURE(12528) #define NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS NS_MSG_GENERATE_FAILURE(12529) #define NS_ERROR_COULD_NOT_GET_SENDERS_IDENTITY NS_MSG_GENERATE_FAILURE(12530) #define NS_ERROR_MIME_MPART_ATTACHMENT_ERROR NS_MSG_GENERATE_FAILURE(12531) -#define NS_MSG_FAILED_COPY_OPERATION NS_MSG_GENERATE_FAILURE(12532) /* 12554 is taken by NS_ERROR_NNTP_NO_CROSS_POSTING. use 12555 as the next one */ -#define NS_MSG_CANCELLING NS_MSG_GENERATE_SUCCESS(12555) - // For message sending report -#define NS_ERROR_SEND_FAILED_BUT_NNTP_OK NS_MSG_GENERATE_FAILURE(12560) #define NS_MSG_ERROR_READING_FILE NS_MSG_GENERATE_FAILURE(12563) #define NS_MSG_ERROR_ATTACHING_FILE NS_MSG_GENERATE_FAILURE(12570) #define NS_ERROR_SMTP_GREETING NS_MSG_GENERATE_FAILURE(12572) #define NS_ERROR_SENDING_RCPT_COMMAND NS_MSG_GENERATE_FAILURE(12575) @@ -63,15 +57,14 @@ #define NS_ERROR_SMTP_SEND_FAILED_UNKNOWN_REASON NS_MSG_GENERATE_FAILURE(12593) #define NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_NO_SSL NS_MSG_GENERATE_FAILURE(12594) #define NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_SSL NS_MSG_GENERATE_FAILURE(12595) #define NS_ERROR_SMTP_AUTH_CHANGE_PLAIN_TO_ENCRYPT NS_MSG_GENERATE_FAILURE(12596) #define NS_ERROR_SMTP_AUTH_FAILURE NS_MSG_GENERATE_FAILURE(12597) #define NS_ERROR_SMTP_AUTH_GSSAPI NS_MSG_GENERATE_FAILURE(12598) #define NS_ERROR_SMTP_AUTH_MECH_NOT_SUPPORTED NS_MSG_GENERATE_FAILURE(12599) -#define NS_ERROR_SMTP_AUTH_NOT_SUPPORTED NS_MSG_GENERATE_FAILURE(12600) #define NS_ERROR_ILLEGAL_LOCALPART NS_MSG_GENERATE_FAILURE(12601) const char* errorStringNameForErrorCode(nsresult aCode); #endif /* _nsComposeStrings_H__ */ diff --git a/mailnews/compose/src/nsMsgSend.cpp b/mailnews/compose/src/nsMsgSend.cpp --- a/mailnews/compose/src/nsMsgSend.cpp +++ b/mailnews/compose/src/nsMsgSend.cpp @@ -3548,17 +3548,16 @@ nsMsgComposeAndSend::DoDeliveryExitProce if (aExitCode == NS_ERROR_SMTP_SEND_FAILED_UNKNOWN_SERVER || aExitCode == NS_ERROR_SMTP_SEND_FAILED_REFUSED || aExitCode == NS_ERROR_SMTP_SEND_FAILED_INTERRUPTED || aExitCode == NS_ERROR_SMTP_SEND_FAILED_TIMEOUT || aExitCode == NS_ERROR_SMTP_PASSWORD_UNDEFINED || aExitCode == NS_ERROR_SMTP_AUTH_FAILURE || aExitCode == NS_ERROR_SMTP_AUTH_GSSAPI || aExitCode == NS_ERROR_SMTP_AUTH_MECH_NOT_SUPPORTED || - aExitCode == NS_ERROR_SMTP_AUTH_NOT_SUPPORTED || aExitCode == NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_NO_SSL || aExitCode == NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_SSL || aExitCode == NS_ERROR_SMTP_AUTH_CHANGE_PLAIN_TO_ENCRYPT || aExitCode == NS_ERROR_STARTTLS_FAILED_EHLO_STARTTLS) { // Print basic SMTP error with the server name encoded. FormatStringWithSMTPHostNameByName(exitString, eMsg); } diff --git a/mailnews/compose/src/nsMsgSendReport.cpp b/mailnews/compose/src/nsMsgSendReport.cpp --- a/mailnews/compose/src/nsMsgSendReport.cpp +++ b/mailnews/compose/src/nsMsgSendReport.cpp @@ -277,18 +277,16 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe #ifdef __GNUC__ // Temporary workaround until bug 783526 is fixed. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wswitch" #endif switch (currError) { case NS_BINDING_ABORTED: - case NS_ERROR_SEND_FAILED_BUT_NNTP_OK: - case NS_MSG_FAILED_COPY_OPERATION: case NS_MSG_UNABLE_TO_SEND_LATER: case NS_MSG_UNABLE_TO_SAVE_DRAFT: case NS_MSG_UNABLE_TO_SAVE_TEMPLATE: //Ignore, don't need to repeat ourself. break; default: const char* errorString = errorStringNameForErrorCode(currError); nsMsgGetMessageByName(errorString, currMessage); diff --git a/mailnews/compose/src/nsSmtpProtocol.cpp b/mailnews/compose/src/nsSmtpProtocol.cpp --- a/mailnews/compose/src/nsSmtpProtocol.cpp +++ b/mailnews/compose/src/nsSmtpProtocol.cpp @@ -100,17 +100,16 @@ nsresult nsExplainErrorDetails(nsISmtpUr #endif switch (aCode) { case NS_ERROR_ILLEGAL_LOCALPART: bundle->GetStringFromName("errorIllegalLocalPart", eMsg); nsTextFormatter::ssprintf(msg, eMsg.get(), arg1, arg2); break; case NS_ERROR_SMTP_SERVER_ERROR: - case NS_ERROR_TCP_READ_ERROR: case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED: case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1: case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2: case NS_ERROR_SENDING_FROM_COMMAND: case NS_ERROR_SENDING_RCPT_COMMAND: case NS_ERROR_SENDING_DATA_COMMAND: case NS_ERROR_SENDING_MESSAGE: case NS_ERROR_SMTP_GREETING: diff --git a/mailnews/mapi/mapihook/src/msgMapiMain.cpp b/mailnews/mapi/mapihook/src/msgMapiMain.cpp --- a/mailnews/mapi/mapihook/src/msgMapiMain.cpp +++ b/mailnews/mapi/mapihook/src/msgMapiMain.cpp @@ -228,34 +228,30 @@ HRESULT nsMAPIConfiguration::GetMAPIErro // Something went wrong with the sender. There's no error we can map to // so we use a general error, see: // https://msdn.microsoft.com/en-us/library/hh802867(v=vs.85).aspx hr = MAPI_E_FAILURE; break; case NS_ERROR_SMTP_AUTH_FAILURE : case NS_ERROR_SMTP_AUTH_GSSAPI : case NS_ERROR_SMTP_AUTH_MECH_NOT_SUPPORTED : - case NS_ERROR_SMTP_AUTH_NOT_SUPPORTED : case NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_NO_SSL : case NS_ERROR_SMTP_AUTH_CHANGE_ENCRYPT_TO_PLAIN_SSL : case NS_ERROR_SMTP_AUTH_CHANGE_PLAIN_TO_ENCRYPT : hr = MAPI_E_LOGIN_FAILURE; break; case NS_MSG_UNABLE_TO_OPEN_FILE : case NS_MSG_UNABLE_TO_OPEN_TMP_FILE : case NS_MSG_COULDNT_OPEN_FCC_FOLDER : case NS_ERROR_FILE_INVALID_PATH : hr = MAPI_E_ATTACHMENT_OPEN_FAILURE; break; case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST : hr = MAPI_E_ATTACHMENT_NOT_FOUND; break; - case NS_MSG_CANCELLING : - hr = MAPI_E_USER_ABORT; - break; case NS_MSG_ERROR_WRITING_FILE : case NS_MSG_UNABLE_TO_SAVE_TEMPLATE : case NS_MSG_UNABLE_TO_SAVE_DRAFT : hr = MAPI_E_ATTACHMENT_WRITE_FAILURE; break; default: hr = MAPI_E_FAILURE; break; diff --git a/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties b/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties --- a/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties +++ b/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties @@ -37,18 +37,16 @@ smtpSecurityIssue=The configuration rela ## LOCALIZATION NOTE (smtpServerError): argument %s is the Outgoing server (SMTP) response smtpServerError=An error occurred while sending mail: Outgoing server (SMTP) error. The server responded: %s. unableToSendLater=Sorry, we were unable to save your message for sending later. ## LOCALIZATION NOTE (communicationsError): argument %d is the error code communicationsError=A communications error occurred: %d. Please try again. dontShowAlert=THIS IS JUST A PLACEHOLDER. YOU SHOULD NEVER SEE THIS STRING. -## LOCALIZATION NOTE (tcpReadError): argument %s is the network error -tcpReadError=A network error occurred while receiving data. (Network Error: %s) Try connecting again. couldNotGetUsersMailAddress2=An error occurred while sending mail: the sender's address (From:) was invalid. Please verify that this email address is correct and try again. couldNotGetSendersIdentity=An error occurred while sending mail: the sender identity was invalid. Please verify the configuration of your identity and try again. mimeMpartAttachmentError=Attachment error. failedCopyOperation=The message was sent successfully, but could not be copied to your Sent folder. nntpNoCrossPosting=You can only send a message to one news server at a time. msgCancelling=Cancelling… sendFailedButNntpOk=Your message has been posted to the newsgroup but has not been sent to the other recipient. errorReadingFile=Error reading file. @@ -106,19 +104,16 @@ smtpHintAuthPlainToEncrypt=The Outgoing smtpAuthFailure=Unable to authenticate to Outgoing server (SMTP) %S. Please check the password, and verify the 'Authentication method' in 'Account Settings | Outgoing server (SMTP)'. # LOCALIZATION NOTE (smtpAuthGssapi): %S is the server hostname smtpAuthGssapi=The Kerberos/GSSAPI ticket was not accepted by the Outgoing server (SMTP) %S. Please check that you are logged in to the Kerberos/GSSAPI realm. # LOCALIZATION NOTE (smtpAuthMechNotSupported): %S is the server hostname smtpAuthMechNotSupported=The Outgoing server (SMTP) %S does not support the selected authentication method. Please change the 'Authentication method' in 'Account Settings | Outgoing server (SMTP)'. -# LOCALIZATION NOTE (smtpAuthenticationNotSupported): %S is the server hostname -smtpAuthenticationNotSupported=Unable to authenticate to Outgoing server (SMTP) %S. It does not support authentication (SMTP-AUTH) but you have chosen to use authentication. Please change the 'Authentication method' to 'None' in 'Account Settings | Outgoing server (SMTP)' or contact your email service provider for instructions. - # LOCALIZATION NOTE (errorIllegalLocalPart): %s is an email address with an illegal localpart errorIllegalLocalPart=There are non-ASCII characters in the local part of the recipient address %s. This is not yet supported. Please change this address and try again. ## Strings used for the save message dialog shown when the user closes a message compose window saveDlogTitle=Save Message ## LOCALIZATION NOTE (saveDlogMessages3): Do not translate the words %1$S and \n. ## %1$S is replaced by the folder name configured for saving drafts (typically the "Drafts" folder).