File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
guides/release/configuring-ember Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -66,35 +66,20 @@ Ember.ENV.RAISE_ON_DEPRECATION = true;
66
66
Ember .ENV .LOG_STACKTRACE_ON_DEPRECATION = true ;
67
67
```
68
68
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
70
70
71
71
``` javascript {data-filename=app/app.js}
72
- import Ember from ' ember' ;
73
72
import fetch from ' fetch' ;
74
73
// ...
75
- Ember . onerror = function (error ) {
74
+ window . addEventListener ( ' error ' , function (error ) {
76
75
fetch (' /error-notification' , {
77
76
method: ' POST' ,
78
77
body: JSON .stringify ({
79
78
stack: error .stack ,
80
79
otherInformation: ' exception message'
81
80
})
82
81
});
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
+ });
98
83
```
99
84
100
85
### Errors within ` Ember.run.later ` Backburner
You can’t perform that action at this time.
0 commit comments