Class Ember

Module: jquery

Show:

Module: jquery
error
Exception
the error object

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.

1
2
3
4
5
6
7
8
import $ from 'jquery';

Ember.onerror = function(error) {
  $.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.