While I was in the midst of developing a new add-on for Firefox, I ran across the need to do some error handling while using an XPCOM interface. By using a try...catch block in my Javascript code, I was able to capture the exceptions thrown by the XPCOM component. If you have used Firefox's Error Console, you probably have already seen what one of these exceptions look like:
The exception produces a result code that begins with the letters NS, which is called an nsresult. I was able to f...
Continue reading...