Description

Make a promise that rejects to error. For consistency and debugging (e.g. stack traces), error should be an instanceof Error.

Signature


calli.reject(error)
Parameter Description
error For consistency and debugging (e.g. stack traces), error should be an instanceof Error.

Example


calli.getJSON('story.json').then(function(story){
  return handleStory(story);
}, function(error){
  console.log(error);
  return calli.reject(error); // re-throw error
});