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;
6666Ember .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' ;
7372import 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
You can’t perform that action at this time.
0 commit comments