Hi Niek,
On Jan 14, 11:15 am, "[email protected]"
<[email protected]> 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>
Thanks, I will definitely do that. I guess that I can use the MochiKit
logging method:
var msg = logger.getMessageText();
to send the get all logged information (although I might need to
either put a limit on the size of the message or use a post request).
I would definitely also want to catch unanticipated errors. Would you
do that by putting the entire onload method in a try-catch
construction where the error is reraised (since I would of course not
just cause my users browsers to silently ignore an error) after
sending a log to my server:
window.onload = function() {
try {
...
} catch(error) {
var msg = logger.getMessageText();
sendToMyServer(msg);
throw error;
};
};
Or do you have a better approach?
Best regards,
Jesper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---