title: Javascript error detection - webkit/chrome
body: <p>I am writing an in-app bug reporting solution for users testing my web app (PHP/jQuery). The ideal solution is simple – user-written short description of a bug and sort of javascript error dump (eg. extended javascript error visible in Chrome's console). So, that's the background, now the question is:</p>
  
  <p><strong>Is there a way to detect javascript errors using the console, or some sort of callbacks?</strong> It even doesn't have to be browser independent – could be narrowed to Webkit, or just to Google Chrome. Just any way to check if there was a javascript error and then to include it in the bug report.</p>