Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Error handling is easier to manage

api().then(function(result) {
    return api2() ;
}).then(function(result2) {
    return api3();
}).then(function(result3) {
    // do work
}).catch(function(error) {
    //handle any error that may occur before this point 
});
 
PREVIOUS NEXT
Tagged: #javascript #Error #handling #easier #manage
ADD COMMENT
Topic
Name
9+1 =