Ember.onerror event

onerror (error) public

Defined in packages/ember-metal/lib/index.js:380

A function may be assigned to Ember.onerror to be called when Ember internals encounter an error. This is useful for specialized error handling and reporting code.

Ember.onerror = function(error) {
  Em.$.ajax('/report-error', 'POST', {
    stack: error.stack,
    otherInformation: 'whatever app state you want to provide'
  });
};

Internally, Ember.onerror is used as Backburner's error handler.

Parameters:

error Exception
the error object
doc_EmberJs
2016-11-30 16:51:36
Comments
Leave a Comment

Please login to continue.