-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Hi,
Given the following code:
window.onerror = err => console.error('Error caught:', err);
foo
The error will be caught with these messages in my console:
Error caught: Script error
Uncaught ReferenceError: foo is not defined
However, given this:
var Raven = require('raven-js');
Raven.config('https://[email protected]/31423').install();
foo
The error won't be noticed at all by Raven:
Uncaught ReferenceError: foo is not defined
I can confirm that .install() sets the window.onerror handler by looking at it before and after .install() is run.
Running: Raven.captureException(new Error('This is an error!')); after .install() does, however, log;
Raven about to send:
> Object { ........
So it seems able to capture through captureException, but not through window.onerror, am I missing something here? (Using Chrome & Webpack with babel)
I get that ReferenceError is often something you might not wanna look at, but it's explicitly included in the docs So I'm a bit confused if Raven always ignores those errors.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels