Skip to content

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

Closed
@benvinegar

Description

@benvinegar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions