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)
SeaMonkey
MailNews: General
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.1final
People
(Reporter: InvisibleSmiley, Assigned: InvisibleSmiley)
Details
Attachments
(1 file)
1.88 KB,
patch
|
mnyromyr
:
review+
mnyromyr
:
superreview+
|
Details | Diff | Splinter Review |
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.)
Assignee | ||
Comment 1•14 years ago
|
||
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).
Comment 2•14 years ago
|
||
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+
Assignee | ||
Comment 3•14 years ago
|
||
Comment on attachment 528411 [details] [diff] [review]
patch [Checkin: comment 3]
http://hg.mozilla.org/comm-central/rev/f63bf0fcb0c1
http://hg.mozilla.org/releases/comm-2.0/rev/93809bb138c6
Attachment #528411 -
Attachment description: patch → patch [Checkin: comment 3]
Assignee | ||
Updated•14 years ago
|
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.
Description
•