Class Ember
publicThis namespace contains all Ember methods and functions. Future versions of Ember may overwrite this namespace and therefore, you should avoid adding any new properties.
At the heart of Ember is Ember-Runtime, a set of core functions that provide cross-platform compatibility and object property observing. Ember-Runtime is small and performance-focused so you can use it alongside other cross-platform libraries such as jQuery. For more details, see Ember-Runtime.
onerror (error) public
Defined in packages/ember-metal/lib/index.js:380
- 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 |
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.