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)

x86
Windows XP
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.
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.
Severity: normal → S3
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.