Use `window.onerror` to catch browser errors and display them