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

Create new post


Upload a picture:
Tags (keywords separated by comma)

Save Cancel
The JavaScript Blog js:   Followers: 5 ; 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 = "";
    var log = linenumber + message + url;"POST", scripturl);
    xhr.setRequestHeader("Content-Type", "text/plain; charset=UTF-8");
  return true;

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

From: Dumitru Glavan
You might give a try to . 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 © 2018 -