title: Log javascript error
body: <p>I want to log all JS errors in my project during the beta-testing time. Now I do it in the following way:</p>
  
  <pre><code>window.onerror = myErrHandler;
  
  function myErrHandler(message, url, line)
  {
      $.ajax({
          cache: false,
          type: "post",
          data: {error:message, url:url, line:line, brouser:navigator.userAgent},
          url: "/Home/LogJavaScript/",
          async: true
      });
      return true;
  }
  </code></pre>
  
  <p>But this way couldn't help to get any information about call stack. So, information about errors inside jQuery or any other outer scripts couldn't help a lot. </p>
  
  <p>Is there any way to improve such logging?</p>