From:  "philippe" <>
Date:  16 Mar 2007 20:22:21 Hong Kong Time

Catch javascript errors with gecko



I'm working for a company who builds automats. In the application we
develop in France, the user's interface is a web Browser.

We choose to use  mozilla, and I developped gecko, because we need to
control all the processes.

We are loading pages with javascript, and we need to know when there
is a Javascript error.

What I need to do is to trap the JS errors as mozilla do it qhen it
puts JS or CSS error into the JS console.

But I don't know when and how to do that.

I looked at nsiJSConsoleService , nsIConsoleMessage, nsIScriptError....
But I did'nt find any way to do what I want.

First what have I to do : have I to register a listener to a service
(maybe the JS engine), in oder to be  informed for errors.

When have I to do that, on each page (during my progress listener's
functions as I do for JSFunctionsDefinition (int the chrome)), or just
once when I create the browser ?

What object do I listen to , what objects do I get.........

I've only questions and no response....

Thank's a lot