documentcloud/backbone — pull request #2579 by adrianocola (2013-05-31 12:09:27+00:00)
Title: Exposed wrapError as Backbone.wrapError

Exposing wrapError as Backbone.wrapError would allow users to define a default error handler for all ajax calls:

```javascript
var originalWrapError = Backbone.wrapError;

Backbone.wrapError = function(model,options){

if(!options.error){
options.error = function(){
//my default error handler
}
}

originalWrapError(model,options);
};
```