fail

  • function
can.Deferred.prototype.fail  

Add a callback to be called when a Deferred is rejected.

deferred.fail(failCallbacks)

Parameters

  1. failCallbacks {function() | Array}

    A function, or an array of functions, to be called when the Deferred is rejected.

deferred.fail(failCallbacks) adds one or more functions to be called when the Deferred object is rejected.

var def = can.Deferred();
def.fail(function(){
    //- Deferred got rejected.
});