Skip to content

Commit 861e9f3

Browse files
committed
Add initial ember.js plugin
1 parent 42352cd commit 861e9f3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

plugins/ember.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Ember.js plugin
3+
*
4+
* Patches event handler callbacks and ajax callbacks.
5+
*/
6+
;(function(window, Raven, Ember) {
7+
'use strict';
8+
9+
// quit if Ember isn't on the page
10+
if (!Ember) {
11+
return;
12+
}
13+
14+
var _oldOnError = Ember.onerror;
15+
Ember.onerror = function EmberOnError(error) {
16+
Raven.captureException(error);
17+
if (typeof _oldOnError === 'function') {
18+
_oldOnError.call(this, error);
19+
}
20+
};
21+
22+
23+
}(this, Raven, window.Ember));

0 commit comments

Comments
 (0)