MCPcopy
hub / github.com/jashkenas/backbone / wrapError

Function wrapError

backbone.js:2141–2147  ·  view source on GitHub ↗
(model, options)

Source from the content-addressed store, hash-verified

2139
2140 // Wrap an optional error callback with a fallback error event.
2141 var wrapError = function(model, options) {
2142 var error = options.error;
2143 options.error = function(resp) {
2144 if (error) error.call(options.context, model, resp, options);
2145 model.trigger('error', model, resp, options);
2146 };
2147 };
2148
2149 // Provide useful information when things go wrong. This method is not meant
2150 // to be used directly; it merely provides the necessary introspection for the

Callers 1

backbone.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…