Ember.onerror = function (error) {
sendError(error);
}
Yes, I get errors here but not all. For example, I can’t handle the next error:
Error in application route Error: Assertion Failed: You made a 'findAll' request for 'mymodel' records, but the adapter's response did not have any data
Where is this code in your app? You should probably have it in an initializer e.g.:
// app/initializers/error-handling.js
import Ember from 'ember';
function initialize(/* application */) {
const onErrorSuper = Ember.onerror || function(e) {
throw e;
};
// your custom handler here, this is just an example
Ember.onerror = function(e) {
if (e instanceof AppExplosion) {
// Silence app explosions, they are not important.
} else {
onErrorSuper(e);
}
};
}
export default {
name: 'error-handling',
initialize
};