Reproduce bug in window.onerror

When running on TravisCI, uncaught errors do not trigger the
`window.onerror` handler.