title: Get the actual Javascript Error object with window.onerror
body: <p>Javascript has this great callback <code>window.onerror</code>. It's quite convenient to track any error. However, it calls with the error name, the file name and the line. It's certainly not as rich as getting the actual error object from a <code>try...catch</code> statement. 
  The actual error object contains a lot more data, so I am trying to get that. Unfortunately, <code>try...catch</code> statement do not work fine when you start having async code.</p>
  
  <p>Is there a way to combine and get the best of both worlds? I initially looked for a way to get  the <em>last</em> error triggered within an <code>onerror</code> block, but it looks like JS doesn't store that.</p>
  
  <p>Any clue?</p>