Skip to content

Thrown strings caught via onerror are sent as "undefined" #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
benvinegar opened this issue Feb 27, 2017 · 1 comment
Closed

Thrown strings caught via onerror are sent as "undefined" #871

benvinegar opened this issue Feb 27, 2017 · 1 comment

Comments

@benvinegar
Copy link
Contributor

benvinegar commented Feb 27, 2017

This means that such an error is not caught via our async instrumentation setTimeout, XMLHttpRequest handlers, etc, but caught via our last-resort onerror handler.

To reproduce:

<script>
// before setTimeout is instrumented by Raven.js
setTimeout(function () {
  throw 'lol'; // this will fire after Raven is configured/installed
});
</script>
<script src="https://cdn.ravenjs.com/3.11.0/raven.js"></script>
<script>
Raven.config('your-dsn').install();
</script>

This is particularly a problem for uBlock users on Safari, because that extension is triggering this error for every blocked URL.

@benvinegar
Copy link
Contributor Author

benvinegar commented Feb 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant