Closed
Bug 826376
Opened 13 years ago
Closed 3 months ago
When I accessed firstNewMessage of a nsIMsgFolder object, exception occurred. Why? [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.firstNewMessage]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: World, Unassigned)
Details
When I simply accessed firstNewMessage property of a nsIMsgFolder object, following exception occurred.
Why? Is it design?
How can I avoid such exception when I simply refer the firstNewMessage property of a nsIMsgFolder object, which is actually returned as an property of a nsIMsgFolder object?
[Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.firstNewMessage]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"
Note-1:
Exception occurred in both Tb 17.0.1 and Tb truk(Tb 20.0a1 2012/12/18 build).
Note-2:
hasNewMessage==false was returned when I referred the firstNewMessage property of the nsIMsgFolder object from JavaScript code.
| Reporter | ||
Comment 1•13 years ago
|
||
Above exception occured in following code for checking property value.
for(var prop in An_object){ var text = prop + "=" + An_object[prop] ; ... }
This exception can easily be caught by try/catch.
try { var text = prop + "=" + An_object[prop] ; }
catch(e) { var text = prop + "=" + "(Exception)" + e; }
Because purpose is checking all property's value for trouble shooting, there is no need to use firstNewMessage. So, practically no problem occurs by the exception.
Updated•3 years ago
|
Severity: normal → S3
Comment 2•3 months ago
|
||
You have to call hasNewMessages first, see https://searchfox.org/comm-central/rev/72b8ba0761b3881d926be53f77fbf75d5a9316d5/mailnews/base/src/nsMsgDBFolder.cpp#558-561. So this is by design, not a bug.
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•