Description

Displays the given error to the user and returns a rejected promise.

Signature


calli.error(error)

calli.error(error, details)
Parameter Description
error Error object, XMLHttpRequest, or message string
details string of more information

Example


$("#link").click(function(event) {
    event.preventDefault();
    var url = event.target.href;
    calli.getText(url).then(function(doc) {
        return handleLink(url, doc);
    }, calli.error);
});