I don't know if this is useful to anyone. But i find it useful.

Here is a js function that will lookup a Componsnts.results number

So if some js code throws

js> throw Components.results.NS_OK;
uncaught exception: 0
js> throw Components.results.NS_ERROR_NOT_INITIALIZED;
uncaught exception: 3253927937
js>

You can then use lookUp to get the Error name.

js> lookUp(0);
NS_OK
js> lookUp(3253927937);
NS_ERROR_NOT_INITIALIZED
js>

This can be useful for debugging your code.

Enjoy!

--pete

Reply via email to