creates and rejects a promise
reason | any | the reason why the promise is rejected |
object | rejected promise |
webix.promise.reject("Incorrect value").then(
function(success){ /*not called*/ },
function(){
console.log(error); //"Incorrect value"
}
);
webix.promise.reject("Incorrect value").fail(function(error){
console.log(error); //"Incorrect value"
});
Back to top