Mozilla DevelopmentThis is a featured page

Error codes


Often you don't see what an XPCOM error code means from Javascript console - it just shows up as Unknown. After Googling around and not finding what I wanted, I dug into some seamonkey code and understood that itsy bit more about error codes:

I started with 0x804b000f showing up as

[Exception... "Component returned failure code: 0x804b000f [nsIChannel.asyncOpen]" nsresult: "0x804b000f (<unknown>)" location: "JS frame :: file:///c:/wil/src/foxri/components/xrdsContentHandler.js :: anonymous :: line 249" data: no]

Not a whole lot of information there. Yes, I got the line number but it is a call to asyncOpen which I have checked over and over and saw no reason why it should fail.

Searching LXR gave me:

http://lxr.mozilla.org/seamonkey/source/xpcom/base/nsError.h

And I found that nothing matches my error code but there seems to be some offsetting done for module-specific error codes using the NS_ERROR_GENERATE_FAILURE macro. The module offsets are defined on line 68-98 and they are added to NS_ERROR_MODULE_BASE_OFFSET (0x45). So, my error code being 0x804BXXXX means that it is module #5 - NS_ERROR_MODULE_NETWORK. Makes sense, nsIChannel does belong to necko.

So, I found the network errors here: http://lxr.mozilla.org/seamonkey/source/netwerk/base/public/nsNetError.h#130
Yes, it's NS_ERROR_IN_PROGRESS.

There you go!



No user avatar
dready
Latest page update: made by dready , Aug 16 2006, 5:12 AM EDT (about this update About This Update dready Edited by dready

190 words added

view changes

- complete history)
More Info: links to this page

Anonymous  (Get credit for your thread)


There are no threads for this page.  Be the first to start a new thread.