[mochikit] Re: Server side Javascript logging

2009-01-15 Thread Jesper
Hi Niek, On Jan 14, 11:15 am, niek.kouwenb...@gmail.com niek.kouwenb...@gmail.com wrote: Catch the JavaScript errors with a try-catch construction, and send the catched error to a logging URL on your server, like: http://www.worldwildweather.com/log.php?message=catched error message

[mochikit] Re: Server side Javascript logging

2009-01-15 Thread niek.kouwenb...@gmail.com
First - I would always use POST for this. If you catch error, shouldn't you use the message of error? Not anything you've logged... Re-trowing the error is a good idea, nothing changes for the end user. On 15 jan, 09:32, Jesper jesper.webm...@gmail.com wrote: Hi Niek, On Jan 14, 11:15 am,

[mochikit] Re: Server side Javascript logging

2009-01-15 Thread troels knak-nielsen
You can try hooking a handler up to window.onerror although this chart suggests that it may only work on certain browsers: http://www.quirksmode.org/dom/events/index.html Maybe there are some browser-specific alternatives for those that don't support this. -- troels On Thu, Jan 15, 2009

[mochikit] Re: Server side Javascript logging

2009-01-15 Thread Jesper
Hi again, On Jan 15, 9:48 am, niek.kouwenb...@gmail.com niek.kouwenb...@gmail.com wrote: First - I would always use POST for this. I agree. From the documentation it seems like I can use: MochiKit.Async.doXHR(...) for this. If you catch error, shouldn't you use the message of error? Not