Skip to content

Commit 24707e8

Browse files
authored
Merge pull request #2028 from achambers/patch-2
Remove import Ember from 'ember';
2 parents 7c44328 + a0e91c8 commit 24707e8

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

guides/release/configuring-ember/debugging.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,20 @@ Ember.ENV.RAISE_ON_DEPRECATION = true;
6666
Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION = true;
6767
```
6868

69-
### Implement an Ember.onerror hook to log all errors in production
69+
### Implement a window error event listener to log all errors in production
7070

7171
```javascript {data-filename=app/app.js}
72-
import Ember from 'ember';
7372
import fetch from 'fetch';
7473
// ...
75-
Ember.onerror = function(error) {
74+
window.addEventListener('error', function(error) {
7675
fetch('/error-notification', {
7776
method: 'POST',
7877
body: JSON.stringify({
7978
stack: error.stack,
8079
otherInformation: 'exception message'
8180
})
8281
});
83-
}
84-
```
85-
86-
### Import the console
87-
88-
If you are using imports with Ember, be sure to import the console:
89-
90-
```javascript
91-
Ember = {
92-
imports: {
93-
Handlebars: Handlebars,
94-
jQuery: $,
95-
console: window.console
96-
}
97-
};
82+
});
9883
```
9984

10085
### Errors within `Ember.run.later` Backburner

0 commit comments

Comments
 (0)