reject

  • function
can.Deferred.prototype.reject  

Reject a Deferred.

deferred.reject([argument])

Parameters

  1. argument {Object}Optional

    The argument to call the failCallback with.

deferred.reject( args ) rejects the Deferred object and calls the fail callbacks with the given arguments.

var def = can.Deferred();
def.reject({ error: 'Thats not an animal.' })