• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Feedback on errors to server

 
Dennis Meyer
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd appreciate a good solution for giving the server app feedback on errors. They usually will popup at the client which is a bad thing for a bigger web application. We experienced that a lot of errors which are pretty hard to find and debug are JS errors. Having a framework giving feedback to the server (maybve via AJAX) would be great.

[ August 26, 2008: Message edited by: Dennis Meyer ]
[ August 26, 2008: Message edited by: Ulf Dittmer ]
 
Stoyan Stefanov
author
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dennis, thanks for the question. This is actually pretty easy thing to implement, you can just have an onerror listener and have it send the error data back to the server via XMLHttpRequest or a simple image "beacon".

The thing is that different browsers implement the error objects differently, so your best bet is probably to loop through all the error object's properties and send them.

Off the top of my head, something like:

 
Stoyan Stefanov
author
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the code above "on error" should be "onerror", for some reason the forum software didn't let me post it otherwise.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stoyan, yeah the forum softwate won;t allow the posting of the onXyz terms or eval(). We usually use HTML entities to get around it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic