2 Matching Annotations
- Oct 2015
-
code.google.com code.google.com
-
The temporary solution we found is to wrap chrome.* api callback with setTimeout() function. In that case errors thrown within chrome.* api call are passed to window.onerror with correct line number. Example:
Wrapping all the
chrome.*
async API calls such that exceptions in the callback result in an error being logged to a handler that we control looks like the way to go. -
In Chrome extensions, errors thrown in callbacks for async APIs do not trigger the global
window.onerror
handler.
-