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://MY_SENTRY_DSN@app.getsentry.com/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!
Hi,
Given the following code:
The error will be caught with these messages in my console:
However, given this:
The error won't be noticed at all by
Raven:I can confirm that
.install()sets thewindow.onerrorhandler by looking at it before and after.install()is run.Running:
Raven.captureException(new Error('This is an error!'));after.install()does, however, log;So it seems able to capture through
captureException, but not throughwindow.onerror, am I missing something here? (Using Chrome & Webpack with babel)I get that
ReferenceErroris 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!