File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -249,22 +249,22 @@ manually hook into such an event handler and call ``Raven.captureException`` or
249249directly.
250250
251251For example, the `RSVP.js library
252- <https://github.com/tildeio/rsvp.js/> `_ allows you to bind an event handler to a `global error event
252+ <https://github.com/tildeio/rsvp.js/> `_ (used by Ember.js) allows you to bind an event handler to a `global error event
253253<https://github.com/tildeio/rsvp.js#error-handling> `_:
254254
255255.. code-block :: javascript
256256
257257 RSVP .on (' error' , function (reason ) {
258- Raven .captureMessage (reason); // NOTE: "reason" is a string
258+ Raven .captureException (reason);
259259 });
260260
261261 `Bluebird
262262<http://bluebirdjs.com/> `_ and other promise libraries report unhandled rejections to a global DOM event, ``unhandledrejection ``:
263263
264264.. code-block :: javascript
265265
266- window .addEventListener (' unhandledrejection' , function (err ) {
267- Raven .captureException (err );
266+ window .addEventListener (' unhandledrejection' , function (evt ) {
267+ Raven .captureException (evt . reason );
268268 });
269269
270270 Please consult your promise library documentation on how to hook into its global unhandled rejection handler, if it exposes one.
You can’t perform that action at this time.
0 commit comments