Emit did-throw-error event in window.onerror