Closed Bug 652913 Opened 14 years ago Closed 14 years ago

On canceling mail folder deletion: Error in MsgDeleteFolder [nsIMsgFolder.deleteSubFolders]

Categories

(SeaMonkey :: MailNews: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.1final

People

(Reporter: InvisibleSmiley, Assigned: InvisibleSmiley)

Details

Attachments

(1 file)

From bug 621921 comment 10: I get this error when canceling the deletion of a normal folder: Error: An error occurred executing the cmd_delete command: [Exception... "Component returned failure code: 0x8055001a [nsIMsgFolder.deleteSubFolders]" nsresult: "0x8055001a (<unknown>)" location: "JS frame :: chrome://messenger/content/mail3PaneWindowCommands.js :: MsgDeleteFolder :: line 983" data: no] Source File: chrome://global/content/globalOverlay.js Line: 100 (The above is with the current trunk line number, i.e. after bug 621921 landing.)
OK, so this is NS_MSG_ERROR_COPY_FOLDER_ABORTED: http://mxr.mozilla.org/comm-central/source/mailnews/local/src/nsLocalMailFolder.cpp#1962 Cf. http://mxr.mozilla.org/comm-central/source/suite/mailnews/messengerdnd.js#197 The attached patch checks against a known exception rather than blindly discarding anything that might happen (which I'd hate to do in such situations where it's exactly known what to expect).
Assignee: nobody → jh
Status: NEW → ASSIGNED
Attachment #528411 - Flags: review?(mnyromyr)
Comment on attachment 528411 [details] [diff] [review] patch [Checkin: comment 3] Review of attachment 528411 [details] [diff] [review]: r/moa=me with the nits addressed. ::: suite/mailnews/mail3PaneWindowCommands.js @@ +935,5 @@ { var folderTree = GetFolderTree(); var selectedFolders = GetSelectedMsgFolders(); var prompt = Services.prompt; + const NS_MSG_ERROR_COPY_FOLDER_ABORTED = 0x8055001a; Make the const go first. @@ +991,5 @@ + try + { + selectedFolder.parent.deleteSubFolders(array, msgWindow); + } + catch (ex if (ex.result == NS_MSG_ERROR_COPY_FOLDER_ABORTED)) {} Add a comment before the catch, like in messengerDND.js::DropOnFolderTree; e.g. "// Ignore known errors from canceled warning dialogs."
Attachment #528411 - Flags: superreview+
Attachment #528411 - Flags: review?(mnyromyr)
Attachment #528411 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.1final
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: