Deferred.then catch an Error was thrown by callback

Like the below.

```javascript
jQuery.Deferred().resolve().then(function() {
  throw new Error('error message');
}).fail(function( err ) {
  console.log( err.message );
});
```