Michael Klepikov wrote:

> Hi,
> 
> I am working with build 0.9.4. I was trying to write an XPCOM component 
> that would follow XPCOM exception protocol so that I can return my own 
> exception that would be visible from JavaScript. I've been somewhat 
> successful, in that JavaScript instead of its default message that it 
> prints on a failure nsresult, printed this to console:

You'll want to keep your eye on this bug -> 
http://bugzilla.mozilla.org/show_bug.cgi?id=83426

Basically the solution for this will allow you to do what you want. In a 
nut shell, it will change xpconnect to use the exception manager to look 
up exceptions for nsresult codes. This will allow you a chance to 
replace or modify the normal xpconnect exception that gets created.

Unfortunately I don't think there's a work around right now. I'll be 
attaching a patch soon to the bug, but it may take some time before it 
hits the tree. It's currently slated for Mozilla 1.0.


Reply via email to