Create your blog and photo album with postbit
Create your blog and photo album

Create new post

Content:

Upload a picture:
Tags (keywords separated by comma)

Save Cancel
The JavaScript Blog js:   Followers: 3 ; Following: 3

Explore The JavaScript Blog's photo albums:
Javascript tools (2)
Photos from posts (7)

Capture javascript errors from your clients


Log all javascript errors from your user's browser to your server with this error handling that capture errors and post them to your server, using ajax:
 
window.onerror = function(message, url, linenumber) {
  if (window.XMLHttpRequest) {
    var xhr = new XMLHttpRequest();
    var scripturl = "http://yourdomain.com/log-js-errors";
    var log = linenumber + message + url;
    xhr.open("POST", scripturl);
    xhr.setRequestHeader("Content-Type", "text/plain; charset=UTF-8");
    xhr.send(log);
  }
  return true;
}

Post by The JavaScript Blog (2012-10-15 17:27)

From: Dumitru Glavan
You might give a try to http://jslogger.com . It logs Javascript errors and events from the clientside. It supports mobile devices and backend logging with NodeJS. 2013-05-26 13:24

Post your comment:

Name: Email: Site:




| Explore users | New posts | Create your blog | Create your photo album |
| About Postbit | Our blog | Terms of use | Contact Postbit |


Copyright © 2017 - postbit.com